Definition at line 340 of file s16x16.h.
340 {
341 u32 val =
static_cast<u32
>(
x.mValue);
346 t =
static_cast<i32
>(
348 } else {
349 t =
static_cast<i32
>(
351 }
352
353
354 constexpr int IFRAC = 24;
355 constexpr i64 c0 = 24189248LL;
356 constexpr i64 c1 = -11728384LL;
357 constexpr i64 c2 = 6098176LL;
358 constexpr i64 c3 = -1788416LL;
359
361
363 acc = c2 + ((acc * t24) >> IFRAC);
364 acc = c1 + ((acc * t24) >> IFRAC);
365 acc = c0 + ((acc * t24) >> IFRAC);
366 i64 frac_part = (acc * t24) >> IFRAC;
367
368 i32 frac16 =
static_cast<i32
>(frac_part >> (IFRAC -
FRAC_BITS));
369 return from_raw(
static_cast<i32
>(
static_cast<u32
>(int_part) <<
FRAC_BITS) + frac16);
370 }
static constexpr FASTLED_FORCE_INLINE int highest_bit(u32 v) FL_NOEXCEPT
static constexpr i32 SCALE
static constexpr int FRAC_BITS
static constexpr FASTLED_FORCE_INLINE s16x16 from_raw(i32 raw) FL_NOEXCEPT
References s16x16(), FASTLED_FORCE_INLINE, FL_NOEXCEPT, FRAC_BITS, from_raw(), highest_bit(), SCALE, fl::t, and fl::x.
Referenced by pow().