Function ambient_api_core::global::lerp

source ·
pub fn lerp<T: Add + Mul<f32>>(
    a: T,
    b: T,
    t: f32
) -> <<T as Mul<f32>>::Output as Add>::Output
where <T as Mul<f32>>::Output: Add,
Expand description

Lerp (linear-interpolate) between any two values that support addition and multiplication.

Note that there may be better domain-specific ways to lerp between values, especially for quaternions and colors.