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

◆ to_uint8()

static u8 fl::to_uint8 ( float f)
static

Definition at line 8 of file splat.cpp.

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

References MIN.

Referenced by splat().

+ Here is the caller graph for this function: