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

◆ getf()

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

Definition at line 291 of file wave_simulation.cpp.

291 {
292 if (!has(x))
293 return 0.0f;
294 float sum = 0.0f;
295 u8 mult = MAX(1, mMultiplier);
296 for (u32 i = 0; i < mult; ++i) {
297 sum += mSim->getf(x * mult + i);
298 }
299 return sum / static_cast<float>(mult);
300}
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:45
unsigned char u8
Definition int.h:17

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

+ Here is the call graph for this function: