12 return static_cast<float>(3.1415926535897932384626433832795f);
18 return static_cast<double>(3.1415926535897932384626433832795);
26 return static_cast<float>(2.71828182845904);
32 return static_cast<double>(2.71828182845904);
37 template <
typename TYPE>
44 constexpr bool SupportsNaN<float>()
50 constexpr bool SupportsNaN<double>()
57 template <
typename TYPE>
60 return static_cast<TYPE
>(0);
76 constexpr double NaN()
89 template <
typename TYPE>
96 constexpr bool SupportsInfinity<float>()
102 constexpr bool SupportsInfinity<double>()
109 template <
typename TYPE>
112 return static_cast<TYPE
>(0);
165 return 0xFFFFFFFFFFFFFFFFull;
189 return 0x7FFFFFFFFFFFFFFFll;
195 return 3.402823465e+38F;
201 return 1.7976931348623158e+307;
257 return -3.402823465e+38F;
263 return -1.7976931348623158e+307;
271 return 1.8446726e+019f;
277 return 1.8446726e+150;
295 template <
typename TYPE>
296 constexpr TYPE SmallEpsilon()
298 return (TYPE)0.000001;
301 template <
typename TYPE>
302 constexpr TYPE DefaultEpsilon()
304 return (TYPE)0.00001;
307 template <
typename TYPE>
308 constexpr TYPE LargeEpsilon()
313 template <
typename TYPE>
314 constexpr TYPE HugeEpsilon()
322 constexpr plUInt32 NumBits<plUInt8>()
328 constexpr plUInt32 NumBits<plUInt16>()
334 constexpr plUInt32 NumBits<plUInt32>()
340 constexpr plUInt32 NumBits<plUInt64>()
346 constexpr plUInt32 NumBits<plInt8>()
352 constexpr plUInt32 NumBits<plInt16>()
358 constexpr plUInt32 NumBits<plInt32>()
364 constexpr plUInt32 NumBits<plInt64>()
370 constexpr plUInt32 NumBits<float>()
376 constexpr plUInt32 NumBits<double>()
This namespace provides common math-functionality as functions.
Definition Constants.h:6
constexpr TYPE Pi()
Returns the natural constant Pi.
constexpr TYPE Infinity()
Returns the value for Infinity as the template type. Returns zero, if the type does not support Infin...
Definition Constants_inl.h:110
constexpr bool SupportsInfinity()
Returns whether the template type supports specialized values to represent Infinity.
Definition Constants_inl.h:90
constexpr TYPE FloatEpsilon()
The difference between 1.0 and the next representable value for the given type.
constexpr TYPE MaxValue()
Returns the largest possible positive value (that is not infinity).
constexpr TYPE HighValue()
A very large value, that is slightly smaller than sqrt(MaxValue()).
constexpr TYPE NaN()
Returns the value for NaN as the template type. Returns zero, if the type does not support NaN.
Definition Constants_inl.h:58
constexpr TYPE e()
Returns the natural constant e.
constexpr TYPE MinValue()
Returns the smallest possible value (that is not -infinity). Usually zero or -MaxValue()....
constexpr bool SupportsNaN()
Returns whether the template type supports specialized values to represent NaN.
Definition Constants_inl.h:38
Simple helper union to store ints and doubles to modify their bit patterns.
Definition Declarations.h:35
Simple helper union to store ints and floats to modify their bit patterns.
Definition Declarations.h:18