Back to Math
lerp
Linear interpolation between a and b.
Syntax
lerp(a, b, t) → r
Backends
TypeScript
Description
Linear interpolation between a and b.
Parameters
| Name | Description |
|---|---|
| a | Start value |
| b | End value |
| t | Interpolation parameter (0 to 1) |
Returns
Interpolated value a + (b - a) * t
Examples
Try It
>> lerp(0, 10, 0.5)