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 43 of file intmap.h.

43 {
44 // Tested to be nearly identical to double precision floating point
45 // doing this operation.
46 if (x == 0) {
47 return 0;
48 }
49 if (x >= 0xffff0000) {
50 return 0xffff;
51 }
52 return uint16_t((x + 32768) >> 16);
53}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82

References LIB8STATIC_ALWAYS_INLINE, and x.

Referenced by fl::Transform16::transform().

+ Here is the caller graph for this function: