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

◆ map32_to_16()

LIB8STATIC_ALWAYS_INLINE uint16_t map32_to_16 ( uint32_t x)

Definition at line 47 of file intmap.h.

47 {
48 // Tested to be nearly identical to double precision floating point
49 // doing this operation.
50 if (x == 0) {
51 return 0;
52 }
53 if (x >= 0xffff0000) {
54 return 0xffff;
55 }
56 return uint16_t((x + 32768) >> 16);
57}
int x
Definition simple.h:92

References LIB8STATIC_ALWAYS_INLINE, and x.

Referenced by FL_DISABLE_WARNING(), and fl::HSV16toRGB().

+ Here is the caller graph for this function: