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

◆ geti16()

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

Definition at line 309 of file wave_simulation.cpp.hpp.

309 {
310 if (!has(x))
311 return 0;
312 u8 mult = fl::max(1, mMultiplier);
313 i32 sum = 0;
314 for (u32 i = 0; i < mult; ++i) {
315 sum += mSim->geti16(x * mult + i);
316 }
317 return static_cast<i16>(sum / mult);
318}
fl::unique_ptr< WaveSimulation1D_Real > mSim
bool has(fl::size x) const
unsigned char u8
Definition stdint.h:131
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT
Definition math.h:75

References has(), fl::max(), mMultiplier, mSim, and fl::x.

Referenced by ~WaveSimulation1D(), geti16All(), geti8(), and getu8().

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