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

◆ getf()

float fl::WaveSimulation2D_Real::getf ( fl::size x,
fl::size 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.0f;
185 }
186 const i16 *curr = (whichGrid == 0 ? grid1.data() : grid2.data());
187 return fixed_to_float(curr[(y + 1) * stride + (x + 1)]);
188}
int y
Definition simple.h:93
int x
Definition simple.h:92
fl::vector< i16, fl::allocator_psram< i16 > > grid1
fl::vector< i16, fl::allocator_psram< i16 > > grid2
#define FASTLED_WARN
Definition warn.h:7

References FASTLED_WARN, fl::wave_detail::fixed_to_float(), grid1, grid2, height, stride, whichGrid, width, x, and y.

+ Here is the call graph for this function: