inverseLerp

inline fun inverseLerp(a: Double, b: Double, t: Double): Double
inline fun inverseLerp(a: Float, b: Float, t: Float): Float

Returns an interpolator value of the linearly interpolated value t between a and b.

Parameters

a

the source value.

b

the destination value.

t

the interpolated value.


Returns an interpolator value of the linearly interpolated vector t between a and b vectors.

Parameters

a

the source vector.

b

the destination vector.

t

the interpolated vector.