Definition at line 78 of file wave_simulation.cpp.
78 {
80 return 0;
81 i32 sum = 0;
83 for (u32 j = 0; j < mult; ++j) {
84 for (u32 i = 0; i < mult; ++i) {
85 u32 xx =
x * mult + i;
86 u32 yy =
y * mult + j;
87 i32 pt =
mSim->geti16(xx, yy);
89
91 if (ch_pt != 0) {
92 sum += ch_pt;
93 } else {
94 sum += pt;
95 }
96 } else {
97 sum += pt;
98 }
99 }
100 }
101 i16 out = static_cast<i16>(sum / (mult * mult));
102 return out;
103}
fl::Grid< i16 > mChangeGrid
bool has(fl::size x, fl::size y) const
fl::unique_ptr< WaveSimulation2D_Real > mSim
References has(), MAX, mChangeGrid, mMultiplier, mSim, mUseChangeGrid, x, and y.
Referenced by geti16All(), geti8(), and getu8().