161 {
163 return;
164
166
167
168 int rad = static_cast<int>(mult) / 2;
169
170 for (fl::size j = 0; j < mult; ++j) {
171 for (fl::size i = 0; i < mult; ++i) {
172
173 int dx = static_cast<int>(i) - rad;
174 int dy = static_cast<int>(j) - rad;
175
177 continue;
178 }
179 fl::size xx =
x * mult + i;
180 fl::size yy =
y * mult + j;
181 if (
mSim->has(xx, yy)) {
184 if (pt == 0) {
185
186 pt = v16;
187 } else {
188 const bool sign_matches = (pt >= 0) == (v16 >= 0);
189 if (!sign_matches) {
190
191 pt = v16;
192 } else {
193
194
195 u16 abs_pt =
static_cast<u16
>(
fl::abs(pt));
196 u16 abs_v16 =
static_cast<u16
>(
fl::abs(v16));
197 if (abs_v16 > abs_pt) {
198 pt = v16;
199 }
200 }
201 }
202 } else {
203
204 mSim->seti16(xx, yy, v16);
205 }
206 }
207 }
208 }
209}
bool has(fl::size x, fl::size y) const FL_NO_EXCEPT
fl::Grid< i16 > mChangeGrid
fl::unique_ptr< WaveSimulation2D_Real > mSim
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
constexpr enable_if< is_fixed_point< T >::value, T >::type abs(T x) FL_NO_EXCEPT