nalgebra

Function partial_clamp

Source
pub fn partial_clamp<'a, T: PartialOrd>(
    value: &'a T,
    min: &'a T,
    max: &'a T,
) -> Option<&'a T>
Expand description

Clamp value between min and max. Returns None if value is not comparable to min or max.