Function jumpy::prelude::egui::lerp

pub fn lerp<R, T>(range: impl Into<RangeInclusive<R>>, t: T) -> R
where T: Real<Output = R> + Mul<R>, R: Copy + Add<Output = R>,
Expand description

Linear interpolation.

assert_eq!(lerp(1.0..=5.0, 0.0), 1.0);
assert_eq!(lerp(1.0..=5.0, 0.5), 3.0);
assert_eq!(lerp(1.0..=5.0, 1.0), 5.0);
assert_eq!(lerp(1.0..=5.0, 2.0), 9.0);