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

◆ lerp16()

FASTLED_FORCE_INLINE CRGB CRGB::lerp16 ( const CRGB & other,
fract16 frac ) const

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

Definition at line 167 of file crgb.hpp.

168{
169 CRGB ret;
170
171 ret.r = lerp16by16(r<<8,other.r<<8,frac)>>8;
172 ret.g = lerp16by16(g<<8,other.g<<8,frac)>>8;
173 ret.b = lerp16by16(b<<8,other.b<<8,frac)>>8;
174
175 return ret;
176}
LIB8STATIC fl::u16 lerp16by16(fl::u16 a, fl::u16 b, fract16 frac)
Linear interpolation between two unsigned 16-bit values, with 16-bit fraction.
Definition lib8tion.h:380
FASTLED_FORCE_INLINE CRGB() FL_NOEXCEPT
Default constructor.
Definition crgb.h:111

References CRGB(), FASTLED_FORCE_INLINE, FL_NOEXCEPT, and lerp16by16().

+ Here is the call graph for this function: