interpolateInternal function

double interpolateInternal(
  1. double? value,
  2. List<double> inputRange,
  3. List<double> outputRange, {
  4. int offset = 0,
})

Implementation

double interpolateInternal(
    double? value, List<double> inputRange, List<double> outputRange,
    {int offset = 0}) {
  if (inputRange.length - offset == 2) {
    return interpolateInternalSingle(value!, inputRange, outputRange, offset);
  }
  return value! < inputRange[offset + 1]
      ? interpolateInternalSingle(value, inputRange, outputRange, offset)
      : interpolateInternal(value, inputRange, outputRange, offset: offset + 1);
}