1/// An extension trait for `f32`. 2pub trait F64Ext { 3 /// Linearly interpolate between `self` and `other` with parameter `t`. 4 fn ext_lerp(self, other: f64, t: f64) -> f64; 5} 6 7impl F64Ext for f64 { 8 fn ext_lerp(self, other: f64, t: f64) -> f64 { 9 self * (1.0 - t) + other * t 10 } 11}