lerp
Linear interpolation between startValue
and endValue
by fraction
.
open fun lerp(outputMin: Float, outputMax: Float, inputMin: Float, inputMax: Float, value: Float): Float
Linear interpolation between outputMin
and outputMax
when value
is between inputMin
and inputMax
.
Note that value
will be coerced into inputMin
and inputMax
.This function can handle input and output ranges that span positive and negative numbers.