UKismetMathLibrary::Conv_DoubleToFloat
Deprecated: Explicit conversions between floats and doubles are not necessary. Please remove node.
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Converts a 64-bit double to a 32-bit float. This function is deprecated — UE5 treats float and double as compatible and no explicit conversion node is needed.
Caveats & Gotchas
- • Marked deprecated with DeprecatedFunction in UE5. The engine now unifies float and double so explicit conversion nodes in Blueprint are unnecessary; the Blueprint compiler will warn you to remove this node.
- • Precision loss is possible: doubles have ~15–17 significant decimal digits, floats only ~6–9. Values outside the float range (approx ±3.4×10^38) produce infinity.
- • BlueprintInternalUseOnly=true means this node does not appear in the Blueprint node search palette and should not be called directly from Blueprint graphs.
Signature
static UE_INL_API float Conv_DoubleToFloat(double InDouble) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InDouble | double | The double-precision value to convert. | — |
Return Type
float Example
C++ narrowing conversion C++
double BigValue = 3.141592653589793;
float NarrowValue = UKismetMathLibrary::Conv_DoubleToFloat(BigValue);
// NarrowValue ≈ 3.1415927f — precision lost beyond 7 significant digits Tags
Version History
Introduced in: 5.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | deprecated | Deprecated since UE5.0 — float/double unification makes explicit conversion unnecessary. |
Feedback
Was this helpful?