Skip to main content

lerp

Function lerp 

Source
pub fn lerp<F>(alpha: F, a: F, b: F) -> F
where F: Copy + Mul<Output = F> + Add<Output = F> + Sub<Output = F>,
Expand description

Linear interpolation.

Formula: a + alpha * (b - a)

Java reference: Mth.lerp(double, double, double)