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

◆ geti16Previous()

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

Definition at line 276 of file wave_simulation.cpp.

276 {
277 if (!has(x))
278 return 0;
279 u8 mult = MAX(1, mMultiplier);
280 i32 sum = 0;
281 for (u32 i = 0; i < mult; ++i) {
282 sum += mSim->geti16Previous(x * mult + i);
283 }
284 return static_cast<i16>(sum / mult);
285}
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:37
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: