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

◆ compute_damp_decay_q15()

i16 fl::wave_detail::compute_damp_decay_q15 ( int damp)

Definition at line 49 of file wave_simulation_real.cpp.hpp.

49 {
50 if (damp <= 0) return INT16_POS; // ~1.0 — no decay
51 const float decay = 1.0f - 1.0f / static_cast<float>(1 << damp);
52 return float_to_fixed(decay);
53}
#define INT16_POS

References FL_NOEXCEPT, float_to_fixed(), and INT16_POS.

Referenced by fl::WaveSimulation1D_Real::WaveSimulation1D_Real(), fl::WaveSimulation2D_Real::WaveSimulation2D_Real(), fl::WaveSimulation1D_Real::setDampening(), and fl::WaveSimulation2D_Real::setDampening().

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