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

◆ getf()

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

Definition at line 63 of file wave_simulation.cpp.

63 {
64 if (!has(x, y))
65 return 0.0f;
66 float sum = 0.0f;
67 for (u32 j = 0; j < mMultiplier; ++j) {
68 for (u32 i = 0; i < mMultiplier; ++i) {
69 sum += mSim->getf(x * mMultiplier + i, y * mMultiplier + j);
70 }
71 }
72 return sum / static_cast<float>(mMultiplier * mMultiplier);
73}
int y
Definition simple.h:93
int x
Definition simple.h:92
bool has(fl::size x, fl::size y) const
fl::unique_ptr< WaveSimulation2D_Real > mSim

References has(), mMultiplier, mSim, x, and y.

+ Here is the call graph for this function: