ork::half Struct Reference
[math]

A 16-bit floating point number. More...

#include <half.h>

List of all members.

Public Member Functions

 half ()
 Constructs an uninitialized half.
 half (float x)
 Constructs a half from a 32-bits floating point value.
float toFloat () const
 Converts to a 32-bits floating point value.
 operator float () const
 Overloaded float cast (allows to write: float x = half).
half operator== (const half v) const
 Equality.
bool operator!= (const half v) const
 Difference.
half operator+ (const half v) const
 Addition.
half operator- (const half v) const
 Subtraction.
half operator* (const half v) const
 Multiplication.
half operator/ (const half v) const
 Divide.
bool isNaN () const
 Test for NaN.
bool isFinite () const
 Test for not (NaN or infinity).
bool isInf () const
 Test for infinity.
bool isNormal () const
 Test for non-denormals.

Detailed Description

A 16-bit floating point number.

Contains 1 sign bit, 5 biased exponent bit, and 10 mantissa bits.


Constructor & Destructor Documentation

ork::half::half (  )  [inline]

Constructs an uninitialized half.

ork::half::half ( float  x  )  [inline]

Constructs a half from a 32-bits floating point value.

Allows to write: half x = 10.f;


Member Function Documentation

bool ork::half::isFinite (  )  const [inline]

Test for not (NaN or infinity).

bool ork::half::isInf (  )  const [inline]

Test for infinity.

bool ork::half::isNaN (  )  const [inline]

Test for NaN.

bool ork::half::isNormal (  )  const [inline]

Test for non-denormals.

ork::half::operator float (  )  const [inline]

Overloaded float cast (allows to write: float x = half).

bool ork::half::operator!= ( const half  v  )  const [inline]

Difference.

half ork::half::operator* ( const half  v  )  const [inline]

Multiplication.

half ork::half::operator+ ( const half  v  )  const [inline]

Addition.

half ork::half::operator- ( const half  v  )  const [inline]

Subtraction.

half ork::half::operator/ ( const half  v  )  const [inline]

Divide.

half ork::half::operator== ( const half  v  )  const [inline]

Equality.

float ork::half::toFloat (  )  const [inline]

Converts to a 32-bits floating point value.


Generated on Mon Oct 18 09:36:07 2010 for ork by  doxygen 1.6.1