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

◆ operator+=()

CRGB16 & fl::CRGB16::operator+= ( const CRGB16 & rhs)
inline

Definition at line 26 of file crgb16.h.

26 {
27 u32 nr = static_cast<u32>(r.raw()) + rhs.r.raw();
28 u32 ng = static_cast<u32>(g.raw()) + rhs.g.raw();
29 u32 nb = static_cast<u32>(b.raw()) + rhs.b.raw();
30 r = u8x8::from_raw(nr > 0xFFFF ? u16(0xFFFF) : static_cast<u16>(nr));
31 g = u8x8::from_raw(ng > 0xFFFF ? u16(0xFFFF) : static_cast<u16>(ng));
32 b = u8x8::from_raw(nb > 0xFFFF ? u16(0xFFFF) : static_cast<u16>(nb));
33 return *this;
34 }
static constexpr FASTLED_FORCE_INLINE u8x8 from_raw(u16 raw) FL_NOEXCEPT
Definition u8x8.h:53
u8x8 b
Definition crgb16.h:11
u8x8 g
Definition crgb16.h:11
u8x8 r
Definition crgb16.h:11

References CRGB16(), b, fl::u8x8::from_raw(), g, r, and fl::u8x8::raw().

+ Here is the call graph for this function: