evaluateFunction method

double evaluateFunction(
  1. String function,
  2. double x
)

Evaluates the given function on the x point.

Implementation

double evaluateFunction(String function, double x) {
  const evaluator = ExpressionParser();
  return evaluator.evaluateOn(function, x);
}