eval method

  1. @override
Decimal eval(
  1. Decimal? v1,
  2. Decimal? v2
)
override

Implementation for this operator.

v1 - Operand 1. v2 - Operand 2. Null for postfix unary operators Returns the result of the operation.

Implementation

@override
Decimal eval(Decimal? v1, Decimal? v2) {
  if (v1 == null) {
    throw new AssertionError("First operand may not be null.");
  }
  if (v2 != null) {
    throw new AssertionError("Did not expect second operand.");
  }

  return fEval(v1);
}