Oklab: Fix rollover error (#1529)

* oklab: Removed unnecessary type conversions

* oklab: Fixed rollover error in color conversion
This commit is contained in:
xkns
2022-11-24 18:15:10 +01:00
committed by GitHub
parent 80aafa22ec
commit 7a31e2bb6d
2 changed files with 14 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
#include <utils/ColorSys.h>
/// Clamps between 0.f and 1.f. Should generally be branchless
double clamp(double value)
inline double clamp(double value)
{
return std::max(0.0, std::min(value, 1.0));
}