39 constexpr fl::i32 RAD_TO_A24 = 2670177;
40 return static_cast<fl::u32
>(
55 const fl::i32 *fade_lut,
59 constexpr fl::i32
FP_ONE =
static_cast<fl::i32
>(1) << FP::FRAC_BITS;
69 fl::i32 cos_dist =
static_cast<fl::i32
>(
71 fl::i32 sin_dist =
static_cast<fl::i32
>(
79 fl::i32 nx =
static_cast<fl::i32
>(
81 fl::i32 ny =
static_cast<fl::i32
>(
85 fl::i32 nz =
static_cast<fl::i32
>(
113 result =
static_cast<fl::i32
>(
114 (
static_cast<fl::i64>(shifted) * 255) >> FP::FRAC_BITS);
115 }
else if (range == 2 *
FP_ONE) {
117 result =
static_cast<fl::i32
>(
118 (
static_cast<fl::i64>(shifted) * 255) >> (FP::FRAC_BITS + 1));
121 result =
static_cast<fl::i32
>(
122 (
static_cast<fl::i64>(shifted) * 255) / range);
136 return (a * b) / 255;
142 return 255 - ((255 - a) * (255 - b)) / 255;
146 if (b >= 255)
return 255;
147 fl::i32
result = (a * 255) / (255 - b);
152 if (b <= 0)
return 0;
153 fl::i32
result = 255 - ((255 - a) * 255) / b;
168 if (r > 255) r = 255;
170 if (g > 255) g = 255;
172 if (b > 255) b = 255;
182 const fl::i32 *fade_lut,
static constexpr int FRAC_BITS
constexpr i32 raw() const FL_NOEXCEPT
FASTLED_FORCE_INLINE fl::i32 screen_fp(fl::i32 a, fl::i32 b)
FASTLED_FORCE_INLINE fl::u32 radiansToA24_fp(fl::i32 angle_s16x16_raw)
FASTLED_FORCE_INLINE fl::i32 colorburn_fp(fl::i32 a, fl::i32 b)
FASTLED_FORCE_INLINE fl::i32 multiply_fp(fl::i32 a, fl::i32 b)
static constexpr i32 FP_ONE
FASTLED_FORCE_INLINE void rgb_sanity_check_fp(fl::i32 &r, fl::i32 &g, fl::i32 &b)
FASTLED_FORCE_INLINE fl::i32 render_value_fp(const render_parameters_fp &p, const fl::i32 *fade_lut, const fl::u8 *perm)
FASTLED_FORCE_INLINE fl::i32 subtract_fp(fl::i32 a, fl::i32 b)
FASTLED_FORCE_INLINE fl::i32 colordodge_fp(fl::i32 a, fl::i32 b)
expected< T, E > result
Alias for expected (Rust-style naming)
FASTLED_FORCE_INLINE fl::i32 render_value_fp_from_float(const render_parameters &anim, const fl::i32 *fade_lut, const fl::u8 *perm)
FASTLED_FORCE_INLINE SinCos32 sincos32(u32 angle) FL_NOEXCEPT
FASTLED_FORCE_INLINE fl::i32 add_fp(fl::i32 a, fl::i32 b)
Base definition for an LED controller.
#define FASTLED_FORCE_INLINE
static fl::i32 pnoise2d_raw(fl::i32 fx_raw, fl::i32 fy_raw, const fl::i32 *fade_lut, const fl::u8 *perm)
static fl::i32 pnoise3d_raw(fl::i32 fx_raw, fl::i32 fy_raw, fl::i32 fz_raw, const fl::i32 *fade_lut, const fl::u8 *perm)