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

◆ geti16Previous()

int16_t fl::WaveSimulation2D::geti16Previous ( size_t x,
size_t y ) const

Definition at line 97 of file wave_simulation.cpp.

97 {
98 if (!has(x, y))
99 return 0;
100 int32_t sum = 0;
101 uint8_t mult = MAX(1, mMultiplier);
102 for (uint32_t j = 0; j < mult; ++j) {
103 for (uint32_t i = 0; i < mult; ++i) {
104 sum +=
105 mSim->geti16Previous(x * mult + i, y * mult + j);
106 }
107 }
108 int16_t out = static_cast<int16_t>(sum / (mult * mult));
109 return out;
110}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:83
fl::scoped_ptr< WaveSimulation2D_Real > mSim
bool has(size_t x, size_t y) const
#define MAX(a, b)
Definition math_macros.h:11

References has(), MAX, mMultiplier, mSim, x, and y.

Referenced by geti16All().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: