FastLED
3.9.15
Loading...
Searching...
No Matches
◆
clip_2n_helper()
__inline int32_t clip_2n_helper
(
int32_t
val
,
int32_t
n
)
Definition at line
68
of file
coder.h
.
68
{
69
int32_t
sign
= val >> 31;
70
int32_t
shifted;
71
int32_t
mask;
72
73
if
(n < 31) {
74
shifted = val >> n;
75
mask = (1L << n) - 1;
76
}
else
{
77
/* Handle edge case where n >= 31 */
78
shifted =
sign
;
79
mask = 0x7FFFFFFF;
80
}
81
82
if
(sign != shifted) {
83
val =
sign
^ mask;
84
}
85
return
val;
86
}
fl::sign
constexpr enable_if< is_fixed_point< T >::value, int >::type sign(T x) FL_NOEXCEPT
Definition
fixed_point.h:530
fl::int32_t
fl::i32 int32_t
Definition
s16x16x4.h:220
References
FL_NOEXCEPT
.
third_party
libhelix_mp3
real
coder.h
Generated on Tue Jun 16 2026 00:07:02 for FastLED by
1.13.2