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

◆ getf()

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

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

109 {
110 if (x >= length) {
111 FL_WARN("Out of range.");
112 return 0.0f;
113 }
114 // Retrieve value from the active grid (offset by 1 for boundary).
115 const i16 *curr = (whichGrid == 0) ? grid1.data() : grid2.data();
116 return wave_detail::fixed_to_float(curr[x + 1]);
117}
#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, length, whichGrid, and fl::x.

+ Here is the call graph for this function: