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

◆ geti16Previous()

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

Definition at line 181 of file wave_simulation_real.cpp.

181 {
182 if (x >= width || y >= height) {
183 FASTLED_WARN("Out of range: " << x << ", " << y);
184 return 0;
185 }
186 const int16_t *prev = (whichGrid == 0 ? grid2.get() : grid1.get());
187 return prev[(y + 1) * stride + (x + 1)];
188}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81
fl::scoped_array< int16_t > grid1
fl::scoped_array< int16_t > grid2
#define FASTLED_WARN
Definition warn.h:7

References FASTLED_WARN, grid1, grid2, height, stride, whichGrid, width, x, and y.