Function matrix::linear_interpolation::lerp
source · pub fn lerp<V>(u: V, v: V, t: f32) -> V
Expand description
Compute the linear interpolation (lerp), which takes two objects of type V and a scalar t of type f32.
V should be an object implementing the Clone
, MulAssign<f32>
, AddAssign
& SubAssign
traits
Formula: lerp(u,v,t) = u+t × (v−u)
Prototype FMA: We: A + B * (C1-C2)
<=> A + B * C
fma
does: a * b + c
, or in this case =>
Option1: fma(B, C, A)
Option2: fma(C, B, A)