lerp
Linear interpolation between from and to: from at t = 0, to at t = 1.
t is not clamped, so values outside 0..=1 extrapolate. Written as
from * (1 - t) + to * t, it is exact at both ends.
Import
Section titled “Import”Cargo feature number (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
from | f64 | The value at t = 0. |
to | f64 | The value at t = 1. |
t | f64 | How far to interpolate between from and to. |
Returns
Section titled “Returns”f64
