/math/lerp
stdLinearly interpolates two given values by the normal value of their distance.
Type signature
(t: number) => ((a: number, b: number) => number)
Examples
lerp(0.5)(0, 10);
// ⇒ 5
Try in REPL
lerp(0)(0, 10);
// ⇒ 0
Try in REPL
lerp(1)(0, 10);
// ⇒ 10
Try in REPL
Questions
- How to linearly interpolate between two values?
- How to interpolate two numbers?