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 187 of file crgb.hpp.

188{
189 CRGB ret;
190
191 ret.r = lerp16by16(r<<8,other.r<<8,frac)>>8;
192 ret.g = lerp16by16(g<<8,other.g<<8,frac)>>8;
193 ret.b = lerp16by16(b<<8,other.b<<8,frac)>>8;
194
195 return ret;
196}
LIB8STATIC uint16_t lerp16by16(uint16_t a, uint16_t b, fract16 frac)
Linear interpolation between two unsigned 16-bit values, with 16-bit fraction.
Definition lib8tion.h:472
FASTLED_FORCE_INLINE CRGB()=default
Default constructor.

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

+ Here is the call graph for this function: