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

◆ fade()

FASTLED_FORCE_INLINE fl::i32 fl::perlin_q16::fade ( fl::i32 t,
const fl::i32 * table )
staticprivate

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

70 {
71 fl::u32 idx = static_cast<fl::u32>(t) >> 8; // Q16 → 8-bit index
72 fl::i32 frac = t & 0xFF;
73 fl::i32 a = table[idx];
74 fl::i32 b = table[idx + 1];
75 // Lerp in Q16: frac is 8 bits, expand to 16 for precision
76 return a + static_cast<fl::i32>(
77 (static_cast<fl::i32>(frac << 8) * (b - a)) >> 16);
78}

References FASTLED_FORCE_INLINE, and fl::t.

Referenced by pnoise2d_raw().

+ Here is the caller graph for this function: