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

◆ init_fade_lut()

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

Definition at line 14 of file perlin_i16_optimized.cpp.hpp.

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

References HP_BITS, HP_ONE, and fl::t.

Referenced by autoresearch::animartrix_check::runPerlinBenchmark().

+ Here is the caller graph for this function: