FastLED 3.9.15
Loading...
Searching...
No Matches
fl::alpha16 Struct Reference

Detailed Description

Unsigned 16-bit alpha / brightness — UNORM16.

Represents values in [0.0, 1.0] inclusive.

Interpretation: raw / 65535 raw 0 = 0.0 raw 32768 = 32768/65535 ~ 0.500 raw 65535 = 65535/65535 = 1.0

Definition at line 87 of file alpha.h.

#include <alpha.h>

Public Member Functions

constexpr alpha16 () FL_NOEXCEPT
 
constexpr alpha16 (double f) FL_NOEXCEPT
 
constexpr alpha16 (float f) FL_NOEXCEPT
 
template<typename IntT, alpha_detail::enable_if_integer_t< IntT > = 0>
constexpr alpha16 (IntT v) FL_NOEXCEPT
 
constexpr operator unsigned short () const FL_NOEXCEPT
 
alpha16operator*= (unsigned short rhs) FL_NOEXCEPT
 
alpha16operator++ () FL_NOEXCEPT
 
alpha16 operator++ (int) FL_NOEXCEPT
 
alpha16operator+= (unsigned short rhs) FL_NOEXCEPT
 
alpha16operator-- () FL_NOEXCEPT
 
alpha16 operator-- (int) FL_NOEXCEPT
 
alpha16operator-= (unsigned short rhs) FL_NOEXCEPT
 
alpha16operator/= (unsigned short rhs) FL_NOEXCEPT
 
alpha16operator<<= (int rhs) FL_NOEXCEPT
 
alpha16operator>>= (int rhs) FL_NOEXCEPT
 
constexpr unsigned short raw () const FL_NOEXCEPT
 
template<typename T>
constexprscale_signed (T v) const FL_NOEXCEPT
 Scale a signed integer by this alpha (UNORM16 semantics).
 
constexpr float to_float () const FL_NOEXCEPT
 

Static Public Member Functions

static constexpr alpha16 from_float (float f) FL_NOEXCEPT
 

Public Attributes

unsigned short value
 

Static Private Member Functions

static constexpr unsigned short _clamp (float f) FL_NOEXCEPT
 

The documentation for this struct was generated from the following file: