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

◆ geti16Previous()

i16 fl::WaveSimulation2D::geti16Previous ( fl::size x,
fl::size y ) const

Definition at line 98 of file wave_simulation.cpp.

98 {
99 if (!has(x, y))
100 return 0;
101 i32 sum = 0;
102 u8 mult = MAX(1, mMultiplier);
103 for (u32 j = 0; j < mult; ++j) {
104 for (u32 i = 0; i < mult; ++i) {
105 sum +=
106 mSim->geti16Previous(x * mult + i, y * mult + j);
107 }
108 }
109 i16 out = static_cast<i16>(sum / (mult * mult));
110 return out;
111}
int y
Definition simple.h:93
int x
Definition simple.h:92
bool has(fl::size x, fl::size y) const
fl::unique_ptr< WaveSimulation2D_Real > mSim
#define MAX(a, b)
Definition math_macros.h:37
unsigned char u8
Definition int.h:17

References has(), MAX, mMultiplier, mSim, x, and y.

Referenced by geti16All().

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