Class Subtraction

    • Constructor Detail

      • Subtraction

        public Subtraction​(ExpressionTreeNode param1,
                           ExpressionTreeNode param2)
        Create an subtraction expression tree that takes as a parameter the given expression
        Parameters:
        param - the expression to subtraction
    • Method Detail

      • evaluate

        public RGBColor evaluate​(double x,
                                 double y)
        Evaluates this expression at the given x,y point by evaluating the subtraction of the function's parameters.
        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 subtraction of the expression's parameters