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

◆ addToRGB()

FASTLED_FORCE_INLINE CRGB & CRGB::addToRGB ( uint8_t d)

Add a constant to each channel, saturating at 0xFF.

Note
This is NOT an operator+= overload because the compiler can't usefully decide when it's being passed a 32-bit constant (e.g. CRGB::Red) and an 8-bit one (CRGB::Blue)

Definition at line 31 of file crgb.hpp.

32{
33 r = qadd8( r, d);
34 g = qadd8( g, d);
35 b = qadd8( b, d);
36 return *this;
37}
LIB8STATIC_ALWAYS_INLINE uint8_t qadd8(uint8_t i, uint8_t j)
Add one byte to another, saturating at 0xFF.
Definition math8.h:31

References CRGB(), FASTLED_FORCE_INLINE, and qadd8().

Referenced by operator++().

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