get the linearly interpolated value between two scalar points x0 and x1, decided by unit interval time t.
ie: lerp(x0, x1, 0.0) === x0, and lerp(x0, x1, 1.0) === x1, and x0 < lerp(x0, x1, t > 0.0 && t < 1.0) < x1.
note that lerp does not clamp the time to the closed UnitInterval[0.0, 1.0].
use lerpClamped if you would like to clamp the time.
get the linearly interpolated value between two scalar points
x0
andx1
, decided by unit interval timet
.ie:
lerp(x0, x1, 0.0) === x0
, andlerp(x0, x1, 1.0) === x1
, andx0 < lerp(x0, x1, t > 0.0 && t < 1.0) < x1
.note that lerp does not clamp the time to the closed UnitInterval
[0.0, 1.0]
.use lerpClamped if you would like to clamp the time.