package calculator.interpreter.ast.arith;
import calculator.interpreter.Environment;
import calculator.interpreter.EvalUtils;
import calculator.interpreter.ast.InfixOp;
/**
* Power operator
*/
public class Power extends InfixOp {
@Override
public Object eval(Environment env) {
double f = EvalUtils.toDouble(this, env, first);
double s = EvalUtils.toDouble(this, env, second);
return Math.pow(f, s);
}
}