fn clamp(value: f32, min: f32, max: f32) -> f32 {
    if value < min {
        return min;
    }
    if value > max {
        return max;
    }
    value
}
// Does not properly handle NaN, which should not really matter
Does not properly handle NaN, which should not really matter
Does not properly handle NaN which should not really matter
fn clamp(value: f32, min: f32, max: f32) -> f32 {
    if value < min {
        return min;
    }
    if value > max {
        return max;
    }
    value
}
fn clamp ( value : f32 , min : f32 , max : f32 ) -> f32 { if value < min { return min ; } if value > max { return max ; } value }
Does not properly handle NaN, which should not really matter
Does not properly handle NaN which should not really matter
value
f32
min
f32
max
f32
value
f32
min
f32
max
f32