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

◆ _clamp()

static constexpr unsigned char fl::alpha8::_clamp ( float f)
inlinestaticconstexprprivate

Definition at line 74 of file alpha.h.

74 {
75 return static_cast<unsigned char>(
76 f <= 0.0f ? 0 : (f >= 1.0f ? 255 : static_cast<unsigned char>(f * 255.0f + 0.5f)));
77 }

References FL_NOEXCEPT.

Referenced by from_float().

+ Here is the caller graph for this function: