MCPcopy Create free account
hub / github.com/FastLED/FastLED / normalize4_if_needed

Function normalize4_if_needed

src/fl/gfx/rgbw_colorimetric.cpp.hpp:258–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258static void normalize4_if_needed(float out[4]) FL_NOEXCEPT {
259 const float m = fl::max(fl::max(out[0], out[1]), fl::max(out[2], out[3]));
260 if (m > 1.0f) {
261 const float inv_m = 1.0f / m;
262 out[0] *= inv_m; out[1] *= inv_m; out[2] *= inv_m; out[3] *= inv_m;
263 }
264}
265
266static const float* column_for_idx(const ProfileCache& cache, int idx) FL_NOEXCEPT {
267 switch (idx) {

Callers 4

solve_strict_subgamutFunction · 0.85
solve_wx_lp_legacyFunction · 0.85
solve_wx_overdriveFunction · 0.85

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected