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

◆ to_uint8()

static uint8_t fl::to_uint8 ( float f)
static

Definition at line 8 of file splat.cpp.

8 {
9 // convert to [0..255] range
10 uint8_t i = static_cast<uint8_t>(f * 255.0f + .5f);
11 return MIN(i, 255);
12}
#define MIN(a, b)
Definition math_macros.h:15

References MIN.

Referenced by splat().

+ Here is the caller graph for this function: