pub fn clampf(v: f32) -> f32 {
    if v < 0.0 {
        0.0
    } else if v > 1.0 {
        1.0
    } else {
        v
    }
}
/** Clamp a float between 0 and 1 */
Clamp a float between 0 and 1
Clamp a float between 0 and 1
pub fn clampf(v: f32) -> f32 {
    if v < 0.0 {
        0.0
    } else if v > 1.0 {
        1.0
    } else {
        v
    }
}
pub fn clampf ( v : f32 ) -> f32 { if v < 0.0 { 0.0 } else if v > 1.0 { 1.0 } else { v } }
Clamp a float between 0 and 1
Clamp a float between 0 and 1
v
f32
v
f32