Function ambient_api::prelude::lerp

source ·
pub fn lerp<T>(a: T, b: T, t: f32) -> <<T as Mul<f32>>::Output as Add>::Output
where T: Add + Mul<f32>, <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.