FastLED 3.10.8
Loading...
Searching...
No Matches

◆ geti16()

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

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

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

References fl::FL_NO_EXCEPT, 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: