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

◆ getf()

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

Definition at line 66 of file wave_simulation.cpp.

66 {
67 if (!has(x, y))
68 return 0.0f;
69 float sum = 0.0f;
70 for (u32 j = 0; j < mMultiplier; ++j) {
71 for (u32 i = 0; i < mMultiplier; ++i) {
72 sum += mSim->getf(x * mMultiplier + i, y * mMultiplier + j);
73 }
74 }
75 return sum / static_cast<float>(mMultiplier * mMultiplier);
76}
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: