linearly v0.32.0Docs


linearly v0.32.0 / scalar / inverseLerp

Function: inverseLerp()

inverseLerp(a, b, t): number

Returns the amount to mix min and max to generate the input value t. This is the inverse of the lerp function. If min and max are equal, the mixing value is 0.5.

Parameters

a: number

b: number

t: number

Returns

number

See

Shorthands

Defined in

src/scalar.ts:250open in new window