inverseLerp

fun inverseLerp(x: Double, y: Double, value: Double): Double

Returns the fraction in [0, 1] that value represents between x and y. Returns 0 when x == y (rather than NaN).

Return

The interpolation factor.