unlerp
Opposite of lerp; gets the range between a lower and upper bound.
var range = //result is typically between 0.0 and 1.0var result = //=> 0.5 //if you want to saturate to 0.0 - 1.0result = result 0 1
The result is not clamped.
Usage
range(min, max, value)
Produces the normalized range of value
between two bounds. Equivalent to:
(value - min) / (max - min)
License
MIT, see LICENSE.md for details.