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

◆ lerp()

FASTLED_FORCE_INLINE s16x16x4 fl::s16x16x4::lerp ( s16x16x4 b,
s16x16 t ) const
inline

Linear interpolation: a + (b - a) * t (using Q16 multiply) t: s16x16 interpolation factor in [0, 1].

Definition at line 106 of file s16x16x4.h.

106 {
107 auto t_vec = s16x16x4::set1(t);
108 auto diff = b - (*this);
109 return (*this) + (diff * t_vec);
110 }
static FASTLED_FORCE_INLINE s16x16x4 set1(s16x16 value)
Definition s16x16x4.h:41

References FASTLED_FORCE_INLINE, and fl::t.