Class Clamp

    • Constructor Detail

      • Clamp

        public Clamp​(ExpressionTreeNode param)
        Create a clamp expression tree that takes as a parameter the given expression
        Parameters:
        param - the expression to clamp
    • Method Detail

      • evaluate

        public RGBColor evaluate​(double x,
                                 double y)
        Evaluates this expression at the given x,y point by evaluating the clamp of the function's parameter.
        Specified by:
        evaluate in interface EvaluatableExpression
        Specified by:
        evaluate in class ExpressionTreeNode
        Parameters:
        x - the value of x
        y - the value of y
        Returns:
        the color from evaluating the clamp of the expression's parameter