ezEngine  Milestone 9
ezMath::BasicType< Type > Struct Template Reference

Public Member Functions

template<>
constexpr bool SupportsInfinity ()
 
template<>
constexpr bool SupportsNaN ()
 
template<>
EZ_ALWAYS_INLINE double GetNaN ()
 
template<>
EZ_ALWAYS_INLINE double GetInfinity ()
 
template<>
EZ_ALWAYS_INLINE double MaxValue ()
 
template<>
constexpr bool SupportsInfinity ()
 
template<>
constexpr bool SupportsNaN ()
 
template<>
EZ_ALWAYS_INLINE float GetNaN ()
 
template<>
EZ_ALWAYS_INLINE float GetInfinity ()
 
template<>
EZ_ALWAYS_INLINE float MaxValue ()
 
template<>
EZ_ALWAYS_INLINE ezInt32 MaxValue ()
 
template<>
EZ_ALWAYS_INLINE ezUInt32 MaxValue ()
 

Static Public Member Functions

static constexpr bool SupportsNaN ()
 Returns whether the templated type supports NaN, at all. Usually only true for float and double.
 
static Type GetNaN ()
 Returns the value for NaN as the template type. Returns zero, if the type does not support NaN. More...
 
static constexpr bool SupportsInfinity ()
 Returns whether this templated type supports specialized values to represent Infinity.
 
static Type GetInfinity ()
 Returns the value for Infinity as the template type. Returns zero, if the type does not support Infinity.
 
static constexpr Type e ()
 Returns the natural constant e.
 
static constexpr Type Pi ()
 Returns the natural constant pi.
 
static Type MaxValue ()
 Returns the largest possible positive value (that is not infinity).
 
static Type SmallEpsilon ()
 
static Type DefaultEpsilon ()
 
static Type LargeEpsilon ()
 
static Type HugeEpsilon ()
 

Member Function Documentation

◆ GetNaN()

template<typename Type >
static Type ezMath::BasicType< Type >::GetNaN ( )
inlinestatic

Returns the value for NaN as the template type. Returns zero, if the type does not support NaN.

Do not use this for comparisons, it will fail. Use it to initialize data (e.g. in debug builds), to detect uninitialized variables. Use the function IsNaN() to check whether a value is not a number.


The documentation for this struct was generated from the following file: