inverseLerp static method

double inverseLerp(
  1. double min,
  2. double max,
  3. double value
)

Implementation

static double inverseLerp(double min, double max, double value) {
  if (min == max) return min;
  return (value - min) / (max - min);
}