1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

Merge pull request #160 from butterfail/greg/invlerp

Fix invlerp method
This commit is contained in:
Lucas
2023-12-11 11:10:26 +01:00
committed by GitHub

View File

@@ -28,7 +28,7 @@ const lerp = (x, y, a) => x * (1 - a) + y * a
* @return {number} inverted lerp value * @return {number} inverted lerp value
*/ */
const invlerp = (x, y, a) => clamp((v - x)/(a - x)) const invlerp = (x, y, a) => clamp((a - x)/(y - x))
/** /**