FastLED 3.10.8
Loading...
Searching...
No Matches

◆ getf()

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

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

233 {
234 if (x >= width || y >= height) {
235 FL_WARN("Out of range: " << x << ", " << y);
236 return 0.0f;
237 }
238 const i16 *curr = (whichGrid == 0 ? grid1.data() : grid2.data());
239 return wave_detail::fixed_to_float(curr[(y + 1) * stride + (x + 1)]);
240}
#define FL_WARN(...)
Definition log.h:437
float fixed_to_float(i16 f) FL_NO_EXCEPT

References fl::wave_detail::fixed_to_float(), fl::FL_NO_EXCEPT, 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: