Function interpolation::lerp [] [src]

pub fn lerp<T: Spatial>(a: &T, b: &T, t: &T::Scalar) -> T

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.