43 :
mValue(f <= -1.0f ? (i32)0x80000000 :
44 f >= 1.0f ? (i32)0x7FFFFFFF :
45 static_cast<i32>(f * 2147483648.0f)) {}
51 template <
typename OtherFP>
52 constexpr s0x32(
const OtherFP& other,
78 return static_cast<float>(
mValue) / (1LL << 31);
85 static_cast<u32
>(
mValue) +
static_cast<u32
>(b.mValue)));
90 static_cast<u32
>(
mValue) -
static_cast<u32
>(b.mValue)));
102 (
static_cast<i64>(
mValue) * b.mValue) >> 31));
110 (
static_cast<i64>(
mValue) << 31) / b.mValue));
125 return (
static_cast<i64>(
mValue) * scalar > 0x7FFFFFFFLL)
127 : (
static_cast<i64>(
mValue) * scalar < -0x80000000LL)
128 ?
from_raw(
static_cast<i32
>(0x80000000u))
153 return from_raw(
x.mValue < 0 ? -
x.mValue :
x.mValue);
157 return from_raw(a.mValue < b.mValue ? a.mValue : b.mValue);
161 return from_raw(a.mValue > b.mValue ? a.mValue : b.mValue);
constexpr i32 raw() const FL_NOEXCEPT
constexpr bool operator>=(s0x32 b) const FL_NOEXCEPT
constexpr bool operator<=(s0x32 b) const FL_NOEXCEPT
constexpr FASTLED_FORCE_INLINE s0x32 operator>>(int shift) const FL_NOEXCEPT
constexpr bool operator==(s0x32 b) const FL_NOEXCEPT
constexpr FASTLED_FORCE_INLINE s16x16 operator*(s16x16 b) const FL_NOEXCEPT
static constexpr FASTLED_FORCE_INLINE s0x32 max(s0x32 a, s0x32 b) FL_NOEXCEPT
constexpr bool operator!=(s0x32 b) const FL_NOEXCEPT
constexpr bool operator<(s0x32 b) const FL_NOEXCEPT
static constexpr FASTLED_FORCE_INLINE s0x32 from_raw(i32 raw) FL_NOEXCEPT
static constexpr FASTLED_FORCE_INLINE s0x32 min(s0x32 a, s0x32 b) FL_NOEXCEPT
constexpr FASTLED_FORCE_INLINE s0x32 operator+(s0x32 b) const FL_NOEXCEPT
constexpr i32 to_int() const FL_NOEXCEPT
constexpr FASTLED_FORCE_INLINE s0x32 operator/(i32 scalar) const FL_NOEXCEPT
constexpr float to_float() const FL_NOEXCEPT
constexpr s0x32(const OtherFP &other, typename fl::enable_if<(OtherFP::INT_BITS<=INT_BITS) &&(OtherFP::FRAC_BITS<=FRAC_BITS) &&(OtherFP::INT_BITS !=INT_BITS||OtherFP::FRAC_BITS !=FRAC_BITS), int >::type=0) FL_NOEXCEPT
constexpr FASTLED_FORCE_INLINE s0x32 operator*(i32 scalar) const FL_NOEXCEPT
static constexpr int FRAC_BITS
constexpr bool operator>(s0x32 b) const FL_NOEXCEPT
constexpr FASTLED_FORCE_INLINE s0x32 operator<<(int shift) const FL_NOEXCEPT
constexpr s0x32(i32 raw, RawTag) FL_NOEXCEPT
static constexpr int INT_BITS
constexpr FASTLED_FORCE_INLINE s0x32 operator/(s0x32 b) const FL_NOEXCEPT
constexpr FASTLED_FORCE_INLINE s0x32 operator-() const FL_NOEXCEPT
static constexpr FASTLED_FORCE_INLINE s0x32 abs(s0x32 x) FL_NOEXCEPT
constexpr FASTLED_FORCE_INLINE s0x32 operator-(s0x32 b) const FL_NOEXCEPT
constexpr s0x32() FL_NOEXCEPT=default
constexpr FASTLED_FORCE_INLINE s0x32 operator*(s0x32 b) const FL_NOEXCEPT
friend constexpr s0x32 operator*(i32 scalar, s0x32 a) FL_NOEXCEPT
#define constexpr
Declares that it is possible to evaluate a value at compile time, introduced in C++11.
Base definition for an LED controller.
#define FL_OPTIMIZATION_LEVEL_O3_BEGIN
#define FASTLED_FORCE_INLINE
#define FL_OPTIMIZATION_LEVEL_O3_END