Skip to main content

clamp_to_u8

Function clamp_to_u8 

Source
fn clamp_to_u8(val: f64) -> u8
Expand description

Clamp a floating-point value to 0–255 and round to nearest u8.