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

◆ fixed_to_float()

float fl::wave_detail::fixed_to_float ( int16_t f)

Definition at line 30 of file wave_simulation_real.cpp.

30 {
31 // return ((float)f) / FIXED_SCALE;
32 if (f < 0) {
33 return ((float)f) / INT16_NEG; // Negative values
34 } else {
35 return ((float)f) / INT16_POS; // Positive values
36 }
37}
#define INT16_NEG
#define INT16_POS

References INT16_NEG, and INT16_POS.

Referenced by fl::WaveSimulation1D_Real::getf(), fl::WaveSimulation2D_Real::getf(), fl::WaveSimulation1D_Real::getSpeed(), and fl::WaveSimulation2D_Real::getSpeed().

+ Here is the caller graph for this function: