Expand description
Utilities for clamping numeric values to a defined range.
Functionsยง
- clamp_
f32 - Clamps the given value to the [-1.0, 1.0] range.
- clamp_
f64 - Clamps the given value to the [-1.0, 1.0] range.
- clamp_
i8 - Clamps the given value to the [-128, 127] range.
- clamp_
i16 - Clamps the given value to the [-32_767, 32_768] range.
- clamp_
i24 - Clamps the given value to the [-8_388_608, 8_388_607] range.
- clamp_
i32 - Clamps the given value to the [-2_147_483_648, 2_147_483_647] range.
- clamp_
u8 - Clamps the given value to the [0, 255] range.
- clamp_
u16 - Clamps the given value to the [0, 65_535] range.
- clamp_
u24 - Clamps the given value to the [0, 16_777_215] range.
- clamp_
u32 - Clamps the given value to the [0, 4_294_967_295] range.