539 {
540 float X_t[3];
543 out_rgb[0] =
fl::max(out_rgb[0], 0.0f);
544 out_rgb[1] =
fl::max(out_rgb[1], 0.0f);
545 out_rgb[2] =
fl::max(out_rgb[2], 0.0f);
546 const float m =
fl::max(
fl::max(out_rgb[0], out_rgb[1]), out_rgb[2]);
547 if (m > 1.0f) {
548 const float inv_m = 1.0f / m;
549 out_rgb[0] *= inv_m;
550 out_rgb[1] *= inv_m;
551 out_rgb[2] *= inv_m;
552 }
553 return true;
554}
void matvec3(const float M[3][3], const float v[3], float out[3]) FL_NO_EXCEPT
void rgb_source_to_XYZ(const RgbColorimetricCache &cache, float s_r, float s_g, float s_b, float X_t[3]) FL_NO_EXCEPT
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT