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

◆ getf()

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

Definition at line 75 of file wave_simulation.cpp.hpp.

75 {
76 if (!has(x, y))
77 return 0.0f;
78 float sum = 0.0f;
79 for (u32 j = 0; j < mMultiplier; ++j) {
80 for (u32 i = 0; i < mMultiplier; ++i) {
81 sum += mSim->getf(x * mMultiplier + i, y * mMultiplier + j);
82 }
83 }
84 return sum / static_cast<float>(mMultiplier * mMultiplier);
85}
bool has(fl::size x, fl::size y) const FL_NO_EXCEPT
fl::unique_ptr< WaveSimulation2D_Real > mSim

References fl::FL_NO_EXCEPT, has(), mMultiplier, mSim, fl::x, and fl::y.

+ Here is the call graph for this function: