FastLED 3.10.8
Loading...
Searching...
No Matches

◆ rgb_sanity_check()

FASTLED_FORCE_INLINE rgb fl::rgb_sanity_check ( rgb & pixel)

Definition at line 131 of file engine_core.h.

131 {
132 if (pixel.red < 0)
133 pixel.red = 0;
134 if (pixel.green < 0)
135 pixel.green = 0;
136 if (pixel.blue < 0)
137 pixel.blue = 0;
138
139 if (pixel.red > 255)
140 pixel.red = 255;
141 if (pixel.green > 255)
142 pixel.green = 255;
143 if (pixel.blue > 255)
144 pixel.blue = 255;
145
146 return pixel;
147}
float green
Definition core_types.h:45
float red
Definition core_types.h:44
float blue
Definition core_types.h:46

References FASTLED_FORCE_INLINE, and FL_NO_EXCEPT.

Referenced by fl::Engine::rgb_sanity_check().

+ Here is the caller graph for this function: