MathUtils.lerp
FunctionLinearly interpolate from floating-point a to b, based on fraction t (where t=0.0 returns a, and t=1.0 returns b).
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
lerp(
a,b,time):number
Linearly interpolate from floating-point a to b, based on fraction t (where t=0.0 returns a, and t=1.0 returns b). This is equivalent to the vec2 and vec3 lerp() functions, but operates on scalar floating-point values.
Parameters
| Parameter | Type |
|---|---|
a | number |
b | number |
time | number |
Returns
number