Function clamp

pub fn clamp<T: PartialOrd>(input: T, min: T, max: T) -> T