Function rin::math::map_clamp [−][src]
pub fn map_clamp<T>(value: T, inmin: T, inmax: T, outmin: T, outmax: T) -> T where
T: Copy + Add<T, Output = T> + Mul<T, Output = T> + Sub<T, Output = T> + Div<T, Output = T> + Clone + Zero + PartialEq<T> + PartialOrd<T>,
Map a value from an input range inmin..inmax
to an output range outmin..outmax
and clamp the
result to be inside the output range