FastLED 3.10.6
Loading...
Searching...
No Matches

◆ from_signed()

static number fl::number::from_signed ( fl::i64 v)
inlinestatic

Definition at line 84 of file number.h.

84 {
85 constexpr fl::i64 kMax = (fl::i64(1) << 60) - 1;
86 constexpr fl::i64 kMin = -(fl::i64(1) << 60);
87 if (v > kMax) v = kMax;
88 if (v < kMin) v = kMin;
89 // Sign-extend into 61 bits, then mask.
90 const fl::u64 payload = static_cast<fl::u64>(v) & kPayloadMask;
92 }
constexpr number() FL_NO_EXCEPT
Definition number.h:70
constexpr fl::u64 payload() const FL_NO_EXCEPT
Definition number.h:104
static constexpr fl::u64 kPayloadMask
Definition number.h:66

References number(), fl::FL_NO_EXCEPT, kPayloadMask, payload(), and SIGNED_INT.

+ Here is the call graph for this function: