| FGenericPlatformMath
|
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h |
Include |
#include "GenericPlatform/GenericPlatformMath.h" |
struct FGenericPlatformMath
Generic implementation for most platforms
Name | Description | ||
---|---|---|---|
|
constexpr T |
Abs ( |
Computes absolute value in a generic way |
|
float |
Abs ( |
Float specialization |
|
float |
Acos ( |
|
|
float |
Asin ( |
|
|
float |
Atan ( |
|
|
float |
Atan2 ( |
|
|
CeilLogTwo ( |
Returns smallest N such that (1< CeilLogTwo(0)=0 because (1<<0)=1 >= 0. |
|
|
CeilLogTwo64 ( |
||
|
double |
CeilToDouble ( |
Converts a double to the nearest greater or equal integer. |
|
float |
CeilToFloat ( |
Converts a float to the nearest greater or equal integer. |
|
CeilToInt ( |
Converts a float to the nearest greater or equal integer. |
|
|
float |
Cos ( |
|
|
CountBits ( |
||
|
CountLeadingZeros ( |
Counts the number of leading zeros in the bit representation of the 32-bit value |
|
|
CountLeadingZeros64 ( |
Counts the number of leading zeros in the bit representation of the 64-bit value |
|
|
CountLeadingZeros8 ( |
Counts the number of leading zeros in the bit representation of the 8-bit value |
|
|
CountTrailingZeros ( |
Counts the number of trailing zeros in the bit representation of the value |
|
|
CountTrailingZeros64 ( |
Counts the number of trailing zeros in the bit representation of the value |
|
|
float |
Exp ( |
Returns e^Value. |
|
float |
Exp2 ( |
Returns 2^Value. |
|
constexpr fl... |
FloatSelect ( |
Returns value based on comparand. |
|
constexpr do... |
FloatSelect ( |
Returns value based on comparand. |
|
FloorLog2 ( |
Computes the base 2 logarithm for an integer value that is greater than 0. |
|
|
FloorLog2_64 ( |
Computes the base 2 logarithm for a 64-bit value that is greater than 0. |
|
|
double |
FloorToDouble ( |
Converts a double to a less or equal integer. |
|
float |
FloorToFloat ( |
Converts a float to the nearest less or equal integer. |
|
FloorToInt ( |
Converts a float to a nearest less or equal integer. |
|
|
float |
Fmod ( |
Returns the floating-point remainder of X / Y Warning: Always returns remainder toward 0, not toward the smaller multiple of Y. |
|
float |
Frac ( |
Returns the fractional part of a float. |
|
float |
Fractional ( |
Returns signed fractional part of a float. |
|
float |
FRand() |
Returns a random float between 0 and 1, inclusive. |
|
GetRandSeed() |
Returns the current seed for SRand(). |
|
|
float |
InvSqrt ( |
Computes a fully accurate inverse square root |
|
float |
InvSqrtEst ( |
Computes a faster but less accurate inverse square root |
|
IsFinite ( |
||
|
IsFinite ( |
Return true if value is finite (not NaN and not Infinity). |
|
|
IsNaN ( |
||
|
IsNaN ( |
Return true if value is NaN (not a number). |
|
|
IsNegativeDouble ( |
||
|
IsNegativeFloat ( |
||
|
float |
LoadHalf ( |
|
|
float |
Log2 ( |
1.0 / Loge(2) = 1.4426950f |
|
float |
Loge ( |
|
|
float |
LogX ( |
|
|
T |
Max |
Max of Array |
|
constexpr T |
Max ( |
Returns higher value in a generic way |
|
VectorRegist... |
Max ( |
Returns the larger of the two values (operates on each component individually) |
|
VectorRegist... |
Min ( |
Returns the smaller of the two values (operates on each component individually) |
|
T |
Min |
Min of Array |
|
constexpr T |
Min ( |
Returns lower value in a generic way |
|
double |
Modf ( |
Breaks the given value into an integral and a fractional part. |
|
float |
Modf ( |
Breaks the given value into an integral and a fractional part. |
|
MortonCode2 ( |
Spreads bits to every other. |
|
|
MortonCode2_64 ( |
||
|
MortonCode3 ( |
Spreads bits to every 3rd. |
|
|
float |
Pow ( |
|
|
Rand() |
Returns a random integer between 0 and RAND_MAX, inclusive |
|
|
RandInit ( |
||
|
ReverseMortonCode2 ( |
Reverses MortonCode2. Compacts every other bit to the right. |
|
|
ReverseMortonCode2_64 ( |
||
|
ReverseMortonCode3 ( |
Reverses MortonCode3. Compacts every 3rd bit to the right. |
|
|
double |
RoundToDouble ( |
Converts a double to the nearest integer. Rounds up when the fraction is .5 |
|
float |
RoundToFloat ( |
Converts a float to the nearest integer. Rounds up when the fraction is .5 |
|
RoundToInt ( |
Converts a float to the nearest integer. Rounds up when the fraction is .5 |
|
|
RoundUpToPowerOfTwo ( |
||
|
RoundUpToPowerOfTwo64 ( |
||
|
constexpr T |
Sign ( |
Returns 1, 0, or -1 depending on relation of T to 0 |
|
float |
Sin ( |
|
|
float |
Sinh ( |
|
|
float |
Sqrt ( |
|
|
float |
SRand() |
Returns a seeded random float in the range [0,1), using the seed from SRandInit(). |
|
SRandInit ( |
Seeds future calls to SRand() |
|
|
StoreHalf ( |
||
|
float |
Tan ( |
|
|
double |
TruncToDouble ( |
Converts a double to an integer value with truncation towards zero. |
|
float |
TruncToFloat ( |
Converts a float to an integer value with truncation towards zero. |
|
constexpr in... |
TruncToInt ( |
Converts a float to an integer with truncation towards zero. |
|
VectorLoadHalf ( |
||
|
VectorStoreHalf ( |
||
|
WideVectorLoadHalf ( |
||
|
WideVectorStoreHalf ( |