FastLED 3.10.8
Loading...
Searching...
No Matches

◆ clampAndScale255()

FASTLED_FORCE_INLINE i32 fl::anonymous_namespace{chasing_spirals.cpp.hpp}::clampAndScale255 ( i32 raw_s16x16)

Definition at line 71 of file chasing_spirals.cpp.hpp.

71 {
72 constexpr i32 FP_ONE = static_cast<i32>(1) << FP::FRAC_BITS;
73 if (raw_s16x16 < 0) raw_s16x16 = 0;
74 if (raw_s16x16 > FP_ONE) raw_s16x16 = FP_ONE;
75 return (raw_s16x16 << 8) - raw_s16x16;
76}
static constexpr int FRAC_BITS
Definition s16x16.h:24
static constexpr i32 FP_ONE

References clampAndScale255(), FASTLED_FORCE_INLINE, fl::FL_NO_EXCEPT, fl::FP_ONE, and fl::s16x16::FRAC_BITS.

Referenced by clampAndScale255().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: