MCPcopy Create free account
hub / github.com/FastLED/FastLED / geti16Previous

Method geti16Previous

src/fl/math/wave/wave_simulation.cpp.hpp:113–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113i16 WaveSimulation2D::geti16Previous(fl::size x, fl::size y) const {
114 if (!has(x, y))
115 return 0;
116 i32 sum = 0;
117 u8 mult = fl::max(1, mMultiplier);
118 for (u32 j = 0; j < mult; ++j) {
119 for (u32 i = 0; i < mult; ++i) {
120 sum +=
121 mSim->geti16Previous(x * mult + i, y * mult + j);
122 }
123 }
124 i16 out = static_cast<i16>(sum / (mult * mult));
125 return out;
126}
127
128bool WaveSimulation2D::geti16All(fl::size x, fl::size y, i16 *curr,
129 i16 *prev, i16 *diff) const {

Callers

nothing calls this directly

Calls 2

hasFunction · 0.85
maxFunction · 0.85

Tested by

no test coverage detected