pub fn lerp<T>(a: T, b: T, f: R64) -> T where T: Num + NumCast,
Linearly interpolates between two values.