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 199 of file wave_simulation_real.cpp.

199 {
200 if (x >= width || y >= height) {
201 FASTLED_WARN("Out of range: " << x << ", " << y);
202 return 0;
203 }
204 const int16_t *prev = (whichGrid == 0 ? grid2.get() : grid1.get());
205 return prev[(y + 1) * stride + (x + 1)];
206}
int y
Definition Audio.ino:72
int x
Definition Audio.ino:71
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.