Function pennereq::map_clamp [−][src]
pub fn map_clamp<T, E>(
value: T,
inmin: T,
inmax: T,
outmin: T,
outmax: T,
eq: E
) -> T where
T: PartialOrd + Sub<T, Output = T> + Add<T, Output = T> + Copy + Zero,
E: FnOnce(T, T, T, T) -> T,
Maps a value from an input range to an output range clamping both the input and output to the corresponding ranges