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

174{
175 CRGB ret;
176
177 ret.r = lerp16by16(r<<8,other.r<<8,frac)>>8;
178 ret.g = lerp16by16(g<<8,other.g<<8,frac)>>8;
179 ret.b = lerp16by16(b<<8,other.b<<8,frac)>>8;
180
181 return ret;
182}
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:310
FASTLED_FORCE_INLINE CRGB()
Default constructor.
Definition crgb.h:158

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

+ Here is the call graph for this function: