@lucid-softworks/number-inverse-lerp
v0.1.0
Published
Find an interpolation amount from numeric endpoints.
Downloads
168
Maintainers
Readme
@lucid-softworks/number-inverse-lerp
Find the interpolation amount represented by a value. The result is not clamped, and equal endpoints throw because the input range has no size.
import { inverseLerp } from "@lucid-softworks/number-inverse-lerp";
inverseLerp(0, 10, 5); // 0.5