step

Function step 

Source
pub fn step<T: Clone, F>(t: f32, min: &T, max: &T, f: F) -> T
where F: FnOnce(f32) -> T,
Expand description

Helper for defining step functions.

Returns min if t ≤ 0, max if t ≥ 1, and f(t) if 0 < t < 1.