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

◆ init_fade_lut()

void fl::perlin_s16x16::init_fade_lut ( fl::i32 * table)
static

Definition at line 15 of file perlin_s16x16.cpp.hpp.

15 {
16 for (int i = 0; i <= 256; i++) {
17 fl::i64 t = static_cast<fl::i64>(i) * (HP_ONE / 256);
18 fl::i64 t2 = (t * t) >> HP_BITS;
19 fl::i64 t3 = (t2 * t) >> HP_BITS;
20 fl::i64 inner = (t * (6LL * HP_ONE)) >> HP_BITS;
21 inner -= 15LL * HP_ONE;
22 inner = (t * inner) >> HP_BITS;
23 inner += 10LL * HP_ONE;
24 table[i] = static_cast<fl::i32>((t3 * inner) >> HP_BITS);
25 }
26}
static constexpr fl::i32 HP_ONE
static constexpr int HP_BITS

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

Referenced by fl::FlowFieldFP::FlowFieldFP(), and fl::anonymous_namespace{chasing_spirals.cpp.hpp}::setupChasingSpiralFrame().

+ Here is the caller graph for this function: