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

◆ operator*() [1/3]

FASTLED_FORCE_INLINE s0x32 fl::s0x32::operator* ( i32 scalar) const
inlineconstexpr

Definition at line 123 of file s0x32.h.

123 {
124 // Q31 * scalar with clamping to prevent overflow
125 return (static_cast<i64>(mValue) * scalar > 0x7FFFFFFFLL)
126 ? from_raw(0x7FFFFFFF)
127 : (static_cast<i64>(mValue) * scalar < -0x80000000LL)
128 ? from_raw(static_cast<i32>(0x80000000u))
129 : from_raw(static_cast<i32>(static_cast<i64>(mValue) * scalar));
130 }
static constexpr FASTLED_FORCE_INLINE s0x32 from_raw(i32 raw) FL_NOEXCEPT
Definition s0x32.h:66
i32 mValue
Definition s0x32.h:174
fl::i64 i64
Definition s16x16x4.h:222

References s0x32(), FASTLED_FORCE_INLINE, FL_NOEXCEPT, from_raw(), and mValue.

+ Here is the call graph for this function: