Function clamp

Source
pub fn clamp<T: PartialOrd>(value: T, min: T, max: T) -> T
Expand description

Clamp a value between a minimum and maximum