Module |
|
Header |
/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h |
Include |
#include "GenericPlatform/GenericPlatformMath.h" |
static constexpr float FloatSelect
(
float Comparand,
float ValueGEZero,
float ValueLTZero
)
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
that we don't define what happens in the case of NaNs as there might be platform specific differences.
ValueGEZero if Comparand >= 0, ValueLTZero otherwise
Parameter |
Description |
---|---|
Comparand |
Comparand the results are based on |
ValueGEZero |
Return value if Comparand >= 0 |
ValueLTZero |
Return value if Comparand < 0 |