UKismetMathLibrary::Conv_Int64ToDouble
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureBlueprintAutocast
Description
Converts a 64-bit integer to a double-precision float. Useful when performing floating-point arithmetic on large integer values.
Caveats & Gotchas
- • Precision loss occurs for large int64 values. A double has 53 bits of mantissa, so integers larger than 2^53 (about 9 quadrillion) cannot be represented exactly. Converting and converting back may not yield the original value.
- • This is a BlueprintAutocast, meaning Blueprint will insert it silently when you connect an Integer64 pin to a Float pin. Be aware of the implicit precision loss if the source integer is very large.
Signature
static UE_INL_API double Conv_Int64ToDouble(int64 InInt) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InInt | int64 | The 64-bit integer to convert to a double. | — |
Return Type
double Example
Computing a fractional progress from large counters C++
int64 Processed = GetProcessedItems();
int64 Total = GetTotalItems();
double Progress = UKismetMathLibrary::Conv_Int64ToDouble(Processed)
/ UKismetMathLibrary::Conv_Int64ToDouble(Total); Tags
Version History
Introduced in: 5.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?