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

Method from_float

src/fl/math/alpha.h:58–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 constexpr float to_float() const FL_NOEXCEPT { return value / 255.0f; }
57
58 static constexpr alpha8 from_float(float f) FL_NOEXCEPT {
59 return alpha8(static_cast<unsigned char>(_clamp(f)));
60 }
61
62 alpha8& operator+=(unsigned char rhs) FL_NOEXCEPT { value += rhs; return *this; }
63 alpha8& operator-=(unsigned char rhs) FL_NOEXCEPT { value -= rhs; return *this; }

Callers

nothing calls this directly

Calls 1

alpha8Class · 0.85

Tested by

no test coverage detected