Class Exponentiate
- java.lang.Object
-
- picasso.parser.language.ExpressionTreeNode
-
- picasso.parser.language.expressions.BinaryOperator
-
- picasso.parser.language.expressions.Exponentiate
-
- All Implemented Interfaces:
EvaluatableExpression
public class Exponentiate extends BinaryOperator
-
-
Field Summary
-
Fields inherited from class picasso.parser.language.ExpressionTreeNode
gelementsToValue
-
-
Constructor Summary
Constructors Constructor Description Exponentiate(ExpressionTreeNode left, ExpressionTreeNode right)
Create a exponentiate expression tree that takes in
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RGBColor
evaluate(double x, double y)
Evaluate this expression, given x and y
-
-
-
Constructor Detail
-
Exponentiate
public Exponentiate(ExpressionTreeNode left, ExpressionTreeNode right)
Create a exponentiate expression tree that takes in- Parameters:
base
- (the number we are are going to exponentiate)exponent
- (the exponent's power)
-
-
Method Detail
-
evaluate
public RGBColor evaluate(double x, double y)
Description copied from class:ExpressionTreeNode
Evaluate this expression, given x and y- Specified by:
evaluate
in interfaceEvaluatableExpression
- Specified by:
evaluate
in classExpressionTreeNode
- Parameters:
x
-y
-- Returns:
- the color from evaluating the exponentiate of the expression's subtrees
-
-