354 {
360 i32 int_pow = 0;
361 if (n >= 0) {
362 int_pow =
static_cast<i32
>(
SCALE) << n;
363 } else {
364 int_pow =
static_cast<i32
>(
SCALE) >> (-n);
365 }
366
367
368 constexpr int IFRAC = 16;
369 constexpr i64 d0 = 45427LL;
370 constexpr i64 d1 = 15775LL;
371 constexpr i64 d2 = 3497LL;
372 constexpr i64 d3 = 836LL;
373
375
377 acc = d2 + ((acc * fr16) >> IFRAC);
378 acc = d1 + ((acc * fr16) >> IFRAC);
379 acc = d0 + ((acc * fr16) >> IFRAC);
380 constexpr i64 one16 = 1LL << IFRAC;
381 i64 frac_pow16 = one16 + ((acc * fr16) >> IFRAC);
382
383 i32 frac_pow8 =
static_cast<i32
>(frac_pow16 >> (IFRAC -
FRAC_BITS));
387 }
constexpr s24x8() FL_NOEXCEPT=default
static constexpr FASTLED_FORCE_INLINE s24x8 from_raw(i32 raw) FL_NOEXCEPT
static constexpr i32 SCALE
static constexpr int INT_BITS
static constexpr int FRAC_BITS
constexpr FASTLED_FORCE_INLINE s24x8 floor() const FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)