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

◆ getf()

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

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

298 {
299 if (!has(x))
300 return 0.0f;
301 float sum = 0.0f;
302 u8 mult = fl::max(1, mMultiplier);
303 for (u32 i = 0; i < mult; ++i) {
304 sum += mSim->getf(x * mult + i);
305 }
306 return sum / static_cast<float>(mult);
307}
fl::unique_ptr< WaveSimulation1D_Real > mSim
bool has(fl::size x) const
unsigned char u8
Definition stdint.h:131
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT
Definition math.h:75

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

Referenced by ~WaveSimulation1D().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: