public class Cosine extends UnaryExpression
Constructor and Description |
---|
Cosine(Expression expression)
Initializes this cosine expression with the given subexpression.
|
Modifier and Type | Method and Description |
---|---|
double |
evaluate(double x,
double y)
Evaluates this cosine expression at the given x- and y-coordinate.
|
String |
toString()
Returns a string representation of this cosine expression.
|
equals, evaluate, hashCode, toString
public Cosine(Expression expression)
expression
- the subexpression.public double evaluate(double x, double y)
evaluate
in class Expression
x
- the x-coordinate.y
- the y-coordinate.