mathInverseLerp

Calculates the interpolation factor for a value between two points. Takes a (start point), b (end point), value (point to calculate factor for). Returns the interpolation factor (t) that would produce value when lerping between a and b.

Mathematics

Parameters & Returns

Parameters

a Double
b Double
value Double

Returns

Double

Quick Summary

Calculates the interpolation factor for a value between two points. Takes a (start point), b (end point), value (point to calculate factor for). Returns the interpolation factor (t) that would produce value when lerping between a and b.

Technical Exegesis...

Returns the interpolation factor (t) that would produce value when lerping between a and b. This is the inverse of mathLerp.

Formula: (value - a) / (b - a). Returns 0 if a equals b. Useful for finding what percentage value is between two points, or converting ranges.

Example

Example.bam
; No example implemented yet