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

◆ getf()

float fl::WaveSimulation1D_Real::getf ( fl::size x) const

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

106 {
107 if (x >= length) {
108 FL_WARN("Out of range.");
109 return 0.0f;
110 }
111 // Retrieve value from the active grid (offset by 1 for boundary).
112 const i16 *curr = (whichGrid == 0) ? grid1.data() : grid2.data();
113 return wave_detail::fixed_to_float(curr[x + 1]);
114}
#define FL_WARN(X)
Definition log.h:276

References fl::wave_detail::fixed_to_float(), FL_WARN, grid1, grid2, length, whichGrid, and fl::x.

+ Here is the call graph for this function: