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

◆ _clamp()

static constexpr unsigned short fl::alpha16::_clamp ( float f)
inlinestaticconstexprprivate

Definition at line 130 of file alpha.h.

130 {
131 return static_cast<unsigned short>(
132 f <= 0.0f ? 0 : (f >= 1.0f ? 65535 : static_cast<unsigned short>(f * 65535.0f + 0.5f)));
133 }

References FL_NOEXCEPT.

Referenced by from_float().

+ Here is the caller graph for this function: