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

◆ map16_to_8()

LIB8STATIC_ALWAYS_INLINE uint8_t map16_to_8 ( uint16_t x)

Definition at line 31 of file intmap.h.

31 {
32 // Tested to be nearly identical to double precision floating point
33 // doing this operation.
34 if (x == 0) {
35 return 0;
36 }
37 if (x >= 0xff00) {
38 return 0xff;
39 }
40 return uint8_t((x + 128) >> 8);
41}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80

References LIB8STATIC_ALWAYS_INLINE, and x.

Referenced by fl::five_bit_bitshift().

+ Here is the caller graph for this function: