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

◆ getf()

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

Definition at line 87 of file wave_simulation_real.cpp.

87 {
88 if (x >= length) {
89 FASTLED_WARN("Out of range.");
90 return 0.0f;
91 }
92 // Retrieve value from the active grid (offset by 1 for boundary).
93 const int16_t *curr = (whichGrid == 0) ? grid1.data() : grid2.data();
94 return fixed_to_float(curr[x + 1]);
95}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82
float fixed_to_float(int16_t f)
#define FASTLED_WARN
Definition warn.h:7

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

+ Here is the call graph for this function: