color_helpers: Use rintf instead of roundf

Saves ~0.2ms
This commit is contained in:
Joshua Ashton 2023-05-09 03:00:04 +00:00 committed by Joshie
parent f0a821e2c6
commit 9bac374ff7

View file

@ -12,7 +12,7 @@
// Color utils
inline int quantize( float fVal, float fMaxVal )
{
return std::max( 0.f, std::min( fMaxVal, roundf( fVal * fMaxVal ) ) );
return std::max( 0.f, std::min( fMaxVal, rintf( fVal * fMaxVal ) ) );
}
inline uint16_t drm_quantize_lut_value( float flValue )