FastLED 3.10.8
Loading...
Searching...
No Matches

◆ lerp()

FASTLED_FORCE_INLINE fl::i32 fl::perlin_q16::lerp ( fl::i32 t,
fl::i32 a,
fl::i32 b )
staticprivate

Definition at line 81 of file perlin_q16.cpp.hpp.

81 {
82 // All values in Q16, result stays Q16
83 return a + static_cast<fl::i32>(
84 (static_cast<fl::i64>(t) * (b - a)) >> HP_BITS);
85}
static constexpr int HP_BITS
Definition perlin_q16.h:16

References FASTLED_FORCE_INLINE, fl::FL_NO_EXCEPT, HP_BITS, and fl::t.