call method

R call(
  1. double value
)

Maps a domain value to a range value.

Implementation

R call(double value) {
  final d0 = _domain[0];
  final d1 = _domain[1];

  double t = (value - d0) / (d1 - d0);

  if (_clamp) {
    t = t.clamp(0.0, 1.0);
  }

  return _interpolator(t);
}