Class Tan
- java.lang.Object
-
- picasso.parser.language.ExpressionTreeNode
-
- picasso.parser.language.expressions.UnaryFunction
-
- picasso.parser.language.expressions.Tan
-
- All Implemented Interfaces:
EvaluatableExpression
public class Tan extends UnaryFunction
Represents the tangent function in the Picasso language.
-
-
Field Summary
-
Fields inherited from class picasso.parser.language.ExpressionTreeNode
gelementsToValue
-
-
Constructor Summary
Constructors Constructor Description Tan(ExpressionTreeNode param)Creates a tangent expression that takes the given expression as a parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RGBColorevaluate(double x, double y)Evaluates the expression at the given x and y coordinates by evaluating the tangent of the function's parameters.-
Methods inherited from class picasso.parser.language.expressions.UnaryFunction
equals, toString
-
-
-
-
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:
evaluatein interfaceEvaluatableExpression- Specified by:
evaluatein classExpressionTreeNode- Parameters:
x- the value of xy- the value of y- Returns:
- the color from evaluating the expression's parameters.
-
-