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

◆ lerp8()

CRGB CRGB::lerp8 ( const CRGB & other,
fract8 amountOf2 ) const

Return a new CRGB object after performing a linear interpolation between this object and the passed in object.

Definition at line 101 of file crgb.cpp.hpp.

101 {
102 CRGB ret;
103
104 ret.r = lerp8by8(r, other.r, amountOf2);
105 ret.g = lerp8by8(g, other.g, amountOf2);
106 ret.b = lerp8by8(b, other.b, amountOf2);
107
108 return ret;
109}
LIB8STATIC fl::u8 lerp8by8(fl::u8 a, fl::u8 b, fract8 frac)
Linear interpolation between two unsigned 8-bit values, with 8-bit fraction.
Definition lib8tion.h:363
FASTLED_FORCE_INLINE CRGB() FL_NOEXCEPT
Default constructor.
Definition crgb.h:111

References CRGB(), and lerp8by8().

+ Here is the call graph for this function: