call method

  1. @override
Y? call(
  1. num? x
)
inherited

Given a value from the domain, returns the corresponding value from the range.

Implementation

@override
call(x) {
  num x0;
  return x == null || (x0 = _transform(x)).isNaN
      ? unknown
      : (
          x0 = 0.5 +
              ((x0 = _transform(x)) - _t1) *
                  (_s * x0 < _s * _t1 ? _k10 : _k21),
          interpolator(clamp ? max(0, min(1, x0)) : x0)
        ).$2;
}