Function rin_math::map_clamp [−][src]
pub fn map_clamp<T: Copy>(
value: T,
inmin: T,
inmax: T,
outmin: T,
outmax: T
) -> T where
T: Add<T, Output = T> + Mul<T, Output = T> + Sub<T, Output = T> + Div<T, Output = T> + Clone + Zero + PartialEq + PartialOrd,
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