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

Method getAverageLight

src/crgb.hpp:152–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152FASTLED_FORCE_INLINE fl::u8 CRGB::getAverageLight( ) const FL_NOEXCEPT {
153#if FASTLED_SCALE8_FIXED == 1
154 const fl::u8 eightyfive = 85;
155#else
156 const fl::u8 eightyfive = 86;
157#endif
158 fl::u8 avg = scale8_LEAVING_R1_DIRTY( r, eightyfive) + \
159 scale8_LEAVING_R1_DIRTY( g, eightyfive) + \
160 scale8_LEAVING_R1_DIRTY( b, eightyfive);
161 cleanup_R1();
162 return avg;
163}
164
165
166

Callers 2

drawTwinkleFoxMethod · 0.80

Calls 2

scale8_LEAVING_R1_DIRTYFunction · 0.50
cleanup_R1Function · 0.50

Tested by

no test coverage detected