Function interpolation::lerp

source ·
pub fn lerp<T: Lerp>(a: &T, b: &T, t: &T::Scalar) -> T
Expand description

Performs linear interpolation. A linear interpolation consists of two states ‘a’ and ‘b’. The ‘t’ variable is a factor between 0 and 1 that gives weight to ‘a’ or ‘b’. When ‘t’ is zero then ‘a’ has full weight. When ‘t’ is one then ‘b’ has full weight.