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

◆ getf()

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

Definition at line 163 of file wave_simulation_real.cpp.

163 {
164 if (x >= width || y >= height) {
165 FASTLED_WARN("Out of range: " << x << ", " << y);
166 return 0.0f;
167 }
168 const int16_t *curr = (whichGrid == 0 ? grid1.get() : grid2.get());
169 return fixed_to_float(curr[(y + 1) * stride + (x + 1)]);
170}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81
fl::scoped_array< int16_t > grid1
fl::scoped_array< int16_t > grid2
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, height, stride, whichGrid, width, x, and y.

+ Here is the call graph for this function: