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

◆ geti16Previous()

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

Definition at line 313 of file wave_simulation.cpp.

313 {
314 if (!has(x))
315 return 0;
316 u8 mult = MAX(1, mMultiplier);
317 i32 sum = 0;
318 for (u32 i = 0; i < mult; ++i) {
319 sum += mSim->geti16Previous(x * mult + i);
320 }
321 return static_cast<i16>(sum / mult);
322}
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.

Referenced by geti16All().

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