call method

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

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

Implementation

@override
call(x) {
  return x != null && !x.isNaN
      ? interpolator(
          (bisectRight(_domain, x, lo: 1) - 1) / (_domain.length - 1))
      : null;
}