FastLED 3.9.15
Loading...
Searching...
No Matches

◆ clampAndScale255()

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

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

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

References clampAndScale255(), FASTLED_FORCE_INLINE, 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: