HPS::Float

class HPS::Float

The Float class is a concept class that exposes a number of useful utilities for working with floating point numbers.

Public Static Functions

static HPS_INLINE bool Equals (float const &a, float const &b, int tolerance=32)

Checks two floats for equality within a specified tolerance. The tolerance is specified in float increments that scale with the floats themselves.

static inline HPS_INLINE bool IsAbnormal (float const &a)

See if the value is not “normal” (infinite or NaN)

static inline HPS_INLINE bool IsInfinite (float const &a)

See if the value is either infinity

static inline HPS_INLINE bool IsNAN (float const &a)

See if the value is Not-A-Number

Public Static Attributes

static const float Infinity

The 32-bit float representation of infinity.

static const float NegativeInfinity

The 32-bit float representation of negative infinity.