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

◆ getf()

float fl::WaveSimulation2D_Real::getf ( fl::size x,
fl::size y ) const

Definition at line 212 of file wave_simulation_real.cpp.hpp.

212 {
213 if (x >= width || y >= height) {
214 FL_WARN("Out of range: " << x << ", " << y);
215 return 0.0f;
216 }
217 const i16 *curr = (whichGrid == 0 ? grid1.data() : grid2.data());
218 return wave_detail::fixed_to_float(curr[(y + 1) * stride + (x + 1)]);
219}
fl::vector_psram< i16 > grid1
fl::vector_psram< i16 > grid2
#define FL_WARN(X)
Definition log.h:276

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

Referenced by ~WaveSimulation2D_Real().

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