pub fn step<T: Clone, F>(t: f32, min: &T, max: &T, f: F) -> Twhere F: FnOnce(f32) -> T,
Helper for defining step functions.
Returns min if t ≤ 0, max if t ≥ 1, and f(t) if 0 < t < 1.
min
max
f(t)