FastLED 3.9.15
Loading...
Searching...
No Matches

◆ rgb_sanity_check()

FASTLED_FORCE_INLINE rgb fl::rgb_sanity_check ( rgb & pixel)

Definition at line 130 of file engine_core.h.

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

References fl::rgb::blue, FASTLED_FORCE_INLINE, fl::rgb::green, and fl::rgb::red.

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

+ Here is the caller graph for this function: