Class Abs

    • Constructor Detail

      • Abs

        public Abs​(ExpressionTreeNode param)
        Create an absolute value expression with the given parameter.
        Parameters:
        param - the expression whose absolute value will be taken
    • Method Detail

      • evaluate

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