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

◆ getf()

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

Definition at line 59 of file wave_simulation.cpp.

59 {
60 if (!has(x, y))
61 return 0.0f;
62 float sum = 0.0f;
63 for (uint32_t j = 0; j < multiplier; ++j) {
64 for (uint32_t i = 0; i < multiplier; ++i) {
65 sum += sim->getf(x * multiplier + i, y * multiplier + j);
66 }
67 }
68 return sum / static_cast<float>(multiplier * multiplier);
69}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81
fl::scoped_ptr< WaveSimulation2D_Real > sim
bool has(size_t x, size_t y) const

References has(), multiplier, sim, x, and y.

+ Here is the call graph for this function: