FastLED
3.10.8
Loading...
Searching...
No Matches
◆
operator()()
[10/13]
void
fl::float_conversion_visitor
< double >::operator()
(
const
i64
&
value
)
inline
Definition at line
458
of file
types.h
.
458
{
459
// AUTO CONVERT INT TO FLOAT. Route through int32 first to avoid the
460
// direct (FloatType)i64 cast — libgcc-nofp's `__aeabi_l2f` helper lives
461
// in `_floatdisf.o` which anchors `__aeabi_dadd / dmul / i2d / ui2d / d2f`
462
// (soft-double helpers, ~5 KB on no-FPU targets). Values fitting in
463
// int32 cover every value the integer-only LowMemory JSON-RPC contract
464
// emits; larger magnitudes saturate at INT32_MIN/MAX. See FastLED #3076.
465
if
(
value
> 2147483647
LL
) {
466
result
=
static_cast<
FloatType
>
(2147483647);
467
}
else
if
(
value
< -2147483648
LL
) {
468
result
=
static_cast<
FloatType
>
(-2147483648);
469
}
else
{
470
result
=
static_cast<
FloatType
>
(
static_cast<
fl::i32
>
(
value
));
471
}
472
}
fl::float_conversion_visitor< double >::result
fl::optional< double > result
Definition
types.h:553
fl::float_conversion_visitor
Definition
types.h:425
fl
float_conversion_visitor< double >
Generated on Sun Oct 18 2026 00:57:06 for FastLED by
1.13.2