Class Subtraction
- java.lang.Object
-
- picasso.parser.language.ExpressionTreeNode
-
- picasso.parser.language.expressions.BinaryOperator
-
- picasso.parser.language.expressions.Subtraction
-
- All Implemented Interfaces:
EvaluatableExpression
public class Subtraction extends BinaryOperator
Represents the subtraction function in the Picasso language.
-
-
Field Summary
-
Fields inherited from class picasso.parser.language.ExpressionTreeNode
gelementsToValue
-
-
Constructor Summary
Constructors Constructor Description Subtraction(ExpressionTreeNode param1, ExpressionTreeNode param2)
Create an subtraction expression tree that takes as a parameter the given expression
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RGBColor
evaluate(double x, double y)
Evaluates this expression at the given x,y point by evaluating the subtraction of the function's parameters.-
Methods inherited from class picasso.parser.language.expressions.BinaryOperator
equals, toString
-
-
-
-
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 interfaceEvaluatableExpression
- Specified by:
evaluate
in classExpressionTreeNode
- Parameters:
x
- the value of xy
- the value of y- Returns:
- the color from evaluating the subtraction of the expression's parameters
-
-