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.hpp.

8 {
9 // convert to [0..255] range
10 u8 i = static_cast<u8>(f * 255.0f + .5f);
11 return fl::min(i, 255);
12}
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NOEXCEPT
Definition math.h:71
unsigned char u8
Definition stdint.h:131

References min().

Referenced by splat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: