Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FMath
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static float TruncateToHalfIfClose
(
float F, |
Truncates a floating point number to half if closer than the given tolerance. | Math/UnrealMathUtility.h | |
static double TruncateToHalfIfClose
(
double F, |
Math/UnrealMathUtility.h |
TruncateToHalfIfClose(float, float)
Description
Truncates a floating point number to half if closer than the given tolerance.
| Name | TruncateToHalfIfClose |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
| Source | /Engine/Source/Runtime/Core/Private/Math/UnrealMath.cpp |
static float TruncateToHalfIfClose
(
float F,
float Tolerance
)
The truncated value
Parameters
| Name | Remarks |
|---|---|
| F | Floating point number to truncate |
| Tolerance | Maximum allowed difference to 0.5 in order to truncate |
TruncateToHalfIfClose(double, double)
| Name | TruncateToHalfIfClose |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
| Source | /Engine/Source/Runtime/Core/Private/Math/UnrealMath.cpp |
static double TruncateToHalfIfClose
(
double F,
double Tolerance
)