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

◆ geti16()

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

Definition at line 190 of file wave_simulation_real.cpp.

190 {
191 if (x >= width || y >= height) {
192 FASTLED_WARN("Out of range: " << x << ", " << y);
193 return 0;
194 }
195 const int16_t *curr = (whichGrid == 0 ? grid1.get() : grid2.get());
196 return curr[(y + 1) * stride + (x + 1)];
197}
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.

Referenced by geti8(), and getu8().

+ Here is the caller graph for this function: