FastLED 3.10.6
Loading...
Searching...
No Matches

◆ adaptationWhiteQ16()

bool fl::anonymous_namespace{chromatic_adaptation.cpp.hpp}::adaptationWhiteQ16 ( Chromaticity c,
i32(&) out[2] )

A white point, converted from float by its bits, inside the open unit square with a non-zero y – the float check (NaN, 0 < x < 1, 1e-6 < y < 1) with y's floor at one s16.16 step.

Definition at line 65 of file chromatic_adaptation.cpp.hpp.

65 {
66 if (!q16FromFloatBits(c.x, &out[0]) || !q16FromFloatBits(c.y, &out[1])) {
67 return false;
68 }
69 return out[0] > 0 && out[0] < kAdaptationQ16One && out[1] > 0 &&
70 out[1] < kAdaptationQ16One;
71}
bool q16FromFloatBits(float value, i32 *out) FL_NO_EXCEPT
s16.16 of a float, rounded to nearest, computed from its IEEE-754 bits with integer arithmetic only –...

References adaptationWhiteQ16(), fl::FL_NO_EXCEPT, kAdaptationQ16One, fl::q16FromFloatBits(), fl::Chromaticity::x, and fl::Chromaticity::y.

Referenced by adaptationWhiteQ16().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: