257 {
262 u32 int_pow =
static_cast<u32
>(
SCALE) << n;
263
264
265 constexpr int IFRAC = 12;
266 constexpr u32 d0 = 2839;
267 constexpr u32 d1 = 986;
268 constexpr u32 d2 = 219;
269 constexpr u32 d3 = 52;
270
271 u32 fr12 =
static_cast<u32
>(fr.mValue) << (IFRAC -
FRAC_BITS);
272
273 u32 acc = d3;
274 acc = d2 + ((acc * fr12) >> IFRAC);
275 acc = d1 + ((acc * fr12) >> IFRAC);
276 acc = d0 + ((acc * fr12) >> IFRAC);
277 constexpr u32 one12 = 1 << IFRAC;
278 u32 frac_pow12 = one12 + ((acc * fr12) >> IFRAC);
279
280 u32 frac_pow4 = frac_pow12 >> (IFRAC -
FRAC_BITS);
284 }
static constexpr FASTLED_FORCE_INLINE u12x4 floor(u12x4 x) FL_NOEXCEPT
constexpr u12x4() FL_NOEXCEPT=default
static constexpr i32 SCALE
static constexpr int FRAC_BITS
static constexpr FASTLED_FORCE_INLINE u12x4 from_raw(u16 raw) FL_NOEXCEPT
static constexpr int INT_BITS
expected< T, E > result
Alias for expected (Rust-style naming)