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

◆ map_float()

FASTLED_FORCE_INLINE float fl::map_float ( float x,
float in_min,
float in_max,
float out_min,
float out_max )

Definition at line 91 of file engine_core.h.

92 {
93 float result =
94 (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
95 if (result < out_min)
96 result = out_min;
97 if (result > out_max)
98 result = out_max;
99 return result;
100}
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

References FASTLED_FORCE_INLINE, FL_NO_EXCEPT, and x.

Referenced by render_value().

+ Here is the caller graph for this function: