Function utils_clamp_f255

Function Documentation

static inline float utils_clamp_f255(float v)

Ensure a value is in the range [0, 255]. Value may be nearby after scaling due to floating point rounding.

Parameters:

v – The value to round.

Returns:

The rounded value.