Skip to main content
clamp_to_u8
r
0.2.0
In r::
interpreter::
graphics::
color
r
::
interpreter
::
graphics
::
color
Function
clamp_
to_
u8
Copy item path
Source
fn clamp_to_u8(val:
f64
) ->
u8
Expand description
Clamp a floating-point value to 0–255 and round to nearest u8.