9#include "fl/math_macros.h"
18 int32_t iteration_scale;
19 unsigned long time_multiplier;
22 NoiseGenerator(int32_t itScale, int32_t timeMul) : iteration_scale(itScale), time_multiplier(timeMul) {}
24 uint8_t Value(int32_t i,
unsigned long time_ms)
const {
25 uint32_t input = iteration_scale * i + time_ms * time_multiplier;
27 return uint8_t(v1 >> 8);
30 int LedValue(int32_t i,
unsigned long time_ms)
const {
31 int val = Value(i, time_ms);
32 return MAX(0, val - 128) * 2;
uint16_t inoise16(uint32_t x, uint32_t y, uint32_t z)
16-bit, fixed point implementation of Perlin's noise.
Implements the FastLED namespace macros.
#define FASTLED_NAMESPACE_END
End of the FastLED namespace.
#define FASTLED_NAMESPACE_BEGIN
Start of the FastLED namespace.
Functions to generate and fill arrays with noise.