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

◆ getf()

float fl::WaveSimulation1D::getf ( fl::size x) const

Definition at line 254 of file wave_simulation.cpp.

254 {
255 if (!has(x))
256 return 0.0f;
257 float sum = 0.0f;
258 u8 mult = MAX(1, mMultiplier);
259 for (u32 i = 0; i < mult; ++i) {
260 sum += mSim->getf(x * mult + i);
261 }
262 return sum / static_cast<float>(mult);
263}
int x
Definition simple.h:92
fl::unique_ptr< WaveSimulation1D_Real > mSim
bool has(fl::size x) const
#define MAX(a, b)
Definition math_macros.h:37
unsigned char u8
Definition int.h:17

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

+ Here is the call graph for this function: