419 {
425 i32 int_pow;
426 if (n >= 0) {
427 int_pow =
static_cast<i32
>(
SCALE) << n;
428 } else {
429 int_pow =
static_cast<i32
>(
SCALE) >> (-n);
430 }
431
432
433 constexpr int IFRAC = 24;
434 constexpr i64 d0 = 11629376LL;
435 constexpr i64 d1 = 4038400LL;
436 constexpr i64 d2 = 895232LL;
437 constexpr i64 d3 = 214016LL;
438
440
442 acc = d2 + ((acc * fr24) >> IFRAC);
443 acc = d1 + ((acc * fr24) >> IFRAC);
444 acc = d0 + ((acc * fr24) >> IFRAC);
445 constexpr i64 one24 = 1LL << IFRAC;
446 i64 frac_pow24 = one24 + ((acc * fr24) >> IFRAC);
447
448 i32 frac_pow16 =
static_cast<i32
>(frac_pow24 >> (IFRAC -
FRAC_BITS));
452 }
static constexpr i32 SCALE
static constexpr int INT_BITS
constexpr FASTLED_FORCE_INLINE s16x16 floor() const FL_NO_EXCEPT
static constexpr int FRAC_BITS
static constexpr FASTLED_FORCE_INLINE s16x16 from_raw(i32 raw) FL_NO_EXCEPT
constexpr s16x16() FL_NO_EXCEPT=default
expected< T, E > result
Alias for expected (Rust-style naming)