Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FGenericPlatformMath
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static float FloatSelect
(
float Comparand, |
Returns value based on comparand. | GenericPlatform/GenericPlatformMath.h | |
static double FloatSelect
(
double Comparand, |
Returns value based on comparand. | GenericPlatform/GenericPlatformMath.h |
FloatSelect(float, float, float)
Description
Returns value based on comparand. The main purpose of this function is to avoid branching based on floating point comparison which can be avoided via compiler intrinsics.
Please note that we don't define what happens in the case of NaNs as there might be platform specific differences.
| Name | FloatSelect |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h |
| Include Path | #include "GenericPlatform/GenericPlatformMath.h" |
static float FloatSelect
(
float Comparand,
float ValueGEZero,
float ValueLTZero
)
ValueGEZero if Comparand >= 0, ValueLTZero otherwise
Parameters
| Name | Remarks |
|---|---|
| Comparand | Comparand the results are based on |
| ValueGEZero | Return value if Comparand >= 0 |
| ValueLTZero | Return value if Comparand < 0 |
FloatSelect(double, double, double)
Description
Returns value based on comparand. The main purpose of this function is to avoid branching based on floating point comparison which can be avoided via compiler intrinsics.
Please note that we don't define what happens in the case of NaNs as there might be platform specific differences.
| Name | FloatSelect |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h |
| Include Path | #include "GenericPlatform/GenericPlatformMath.h" |
static double FloatSelect
(
double Comparand,
double ValueGEZero,
double ValueLTZero
)
ValueGEZero if Comparand >= 0, ValueLTZero otherwise
Parameters
| Name | Remarks |
|---|---|
| Comparand | Comparand the results are based on |
| ValueGEZero | Return value if Comparand >= 0 |
| ValueLTZero | Return value if Comparand < 0 |