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

◆ map_range_clamped()

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

Definition at line 41 of file map_range.h.

42 {
43 // Not fully tested with all unsigned types, so watch out if you use this
44 // with uint16_t and you value < in_min.
45 using namespace map_range_detail;
46 value = clamp(value, in_min, in_max);
47 return map_range<T, U>(value, in_min, in_max, out_min, out_max);
48}
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
Definition clamp.h:10
FASTLED_FORCE_INLINE U map_range(T value, T in_min, T in_max, U out_min, U out_max)
Definition map_range.h:26

References clamp(), FASTLED_FORCE_INLINE, and map_range().

+ Here is the call graph for this function: