FastLED
3.9.15
Loading...
Searching...
No Matches
◆
operator()()
[10/13]
void
fl::float_conversion_visitor
< double >::operator()
(
const
i64
&
value
)
inline
Definition at line
421
of file
types.h
.
421
{
422
// AUTO CONVERT INT TO FLOAT. Route through int32 first to avoid the
423
// direct (FloatType)i64 cast — libgcc-nofp's `__aeabi_l2f` helper lives
424
// in `_floatdisf.o` which anchors `__aeabi_dadd / dmul / i2d / ui2d / d2f`
425
// (soft-double helpers, ~5 KB on no-FPU targets). Values fitting in
426
// int32 cover every value the integer-only LowMemory JSON-RPC contract
427
// emits; larger magnitudes saturate at INT32_MIN/MAX. See FastLED #3076.
428
if
(
value
> 2147483647
LL
) {
429
result
=
static_cast<
FloatType
>
(2147483647);
430
}
else
if
(
value
< -2147483648
LL
) {
431
result
=
static_cast<
FloatType
>
(-2147483648);
432
}
else
{
433
result
=
static_cast<
FloatType
>
(
static_cast<
fl::i32
>
(
value
));
434
}
435
}
fl::float_conversion_visitor< double >::result
fl::optional< double > result
Definition
types.h:506
fl::float_conversion_visitor
Definition
types.h:394
fl
float_conversion_visitor< double >
Generated on Tue Jun 16 2026 00:07:05 for FastLED by
1.13.2