Class Tan

    • Constructor Detail

      • Tan

        public Tan​(ExpressionTreeNode param)
        Creates a tangent expression that takes the given expression as a parameter.
        Parameters:
        param - the expression to which to apply the tangent function.
    • Method Detail

      • evaluate

        public RGBColor evaluate​(double x,
                                 double y)
        Evaluates the expression at the given x and y coordinates by evaluating the tangent 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 expression's parameters.