MCPcopy Create free account
hub / github.com/FastLED/FastLED / from_float

Method from_float

src/fl/math/alpha.h:103–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101 constexpr float to_float() const FL_NOEXCEPT { return value / 65535.0f; }
102
103 static constexpr alpha16 from_float(float f) FL_NOEXCEPT {
104 return alpha16(static_cast<unsigned short>(_clamp(f)));
105 }
106
107 alpha16& operator+=(unsigned short rhs) FL_NOEXCEPT { value += rhs; return *this; }
108 alpha16& operator-=(unsigned short rhs) FL_NOEXCEPT { value -= rhs; return *this; }

Callers

nothing calls this directly

Calls 1

alpha16Class · 0.85

Tested by

no test coverage detected