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

◆ fixed_to_float()

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

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

29 {
30 // return ((float)f) / FIXED_SCALE;
31 if (f < 0) {
32 return ((float)f) / INT16_NEG; // Negative values
33 } else {
34 return ((float)f) / INT16_POS; // Positive values
35 }
36}
#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: