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

◆ map_range()

template<typename T, typename U>
FASTLED_FORCE_INLINE U fl::map_range ( T value,
T in_min,
T in_max,
U out_min,
U out_max )

Definition at line 26 of file map_range.h.

27 {
28 // Not fully tested with all unsigned types, so watch out if you use this
29 // with uint16_t and you value < in_min.
30 using namespace map_range_detail;
31 if (equals(value, in_min)) {
32 return out_min;
33 }
34 if (equals(value, in_max)) {
35 return out_max;
36 }
37 return map_range_math<T, U>::map(value, in_min, in_max, out_min, out_max);
38}

References FASTLED_FORCE_INLINE.

Referenced by loop(), anonymous_namespace{xypaths.cpp}::make_path(), fl::map_range_detail::map_range_math< uint8_t, uint8_t >::map(), map_range_clamped(), fl::XYPathRenderer::rasterize(), and fl::HashMap< Key, T, Hash, KeyEqual >::setLoadFactor().

+ Here is the caller graph for this function: