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

◆ geti16Previous()

i16 fl::WaveSimulation1D::geti16Previous ( fl::size x) const

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

320 {
321 if (!has(x))
322 return 0;
323 u8 mult = fl::max(1, mMultiplier);
324 i32 sum = 0;
325 for (u32 i = 0; i < mult; ++i) {
326 sum += mSim->geti16Previous(x * mult + i);
327 }
328 return static_cast<i16>(sum / mult);
329}
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(), and geti16All().

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