Definition at line 384 of file s16x16.h.
384 {
385 u32 val =
static_cast<u32
>(
x.mValue);
390 t =
static_cast<i32
>(
392 } else {
393 t =
static_cast<i32
>(
395 }
396
397
398 constexpr int IFRAC = 24;
399 constexpr i64 c0 = 24189248LL;
400 constexpr i64 c1 = -11728384LL;
401 constexpr i64 c2 = 6098176LL;
402 constexpr i64 c3 = -1788416LL;
403
405
407 acc = c2 + ((acc * t24) >> IFRAC);
408 acc = c1 + ((acc * t24) >> IFRAC);
409 acc = c0 + ((acc * t24) >> IFRAC);
410 i64 frac_part = (acc * t24) >> IFRAC;
411
412 i32 frac16 =
static_cast<i32
>(frac_part >> (IFRAC -
FRAC_BITS));
413 return from_raw(
static_cast<i32
>(
static_cast<u32
>(int_part) <<
FRAC_BITS) + frac16);
414 }
static constexpr i32 SCALE
static constexpr int FRAC_BITS
static constexpr FASTLED_FORCE_INLINE int highest_bit(u32 v) FL_NO_EXCEPT
static constexpr FASTLED_FORCE_INLINE s16x16 from_raw(i32 raw) FL_NO_EXCEPT
References s16x16(), FASTLED_FORCE_INLINE, fl::FL_NO_EXCEPT, FRAC_BITS, from_raw(), highest_bit(), SCALE, fl::t, and fl::x.
Referenced by pow().