lerp
fun lerp(value: Double, inputMin: Double, inputMax: Double, outputMin: Double, outputMax: Double): Double(source)
Linearly interpolates (remaps) a value from one range to another.
Maps value from the input range \(inputMin, inputMax\) to the output range \(outputMin, outputMax\).
Return
The interpolated value in the output range
Parameters
value
The value to interpolate
inputMin
The lower bound of the input range
inputMax
The upper bound of the input range
outputMin
The lower bound of the output range
outputMax
The upper bound of the output range
Linearly interpolates between \(low\) and \(high\) at value t.
Parameters
t
interpolation factor, typically in the range \(0, 1\)