FastLED 3.10.8
Loading...
Searching...
No Matches

◆ getf()

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

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

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

References fl::FL_NO_EXCEPT, 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: