#include <half_float.h>

Public Member Functions

 HalfFloat ()
 
 HalfFloat (const HalfFloat &other)
 
 HalfFloat (float v)
 
HalfFloatfrom_float (float v)
 
 operator float () const
 
HalfFloatoperator= (const HalfFloat &other)
 
HalfFloatoperator= (const float v)
 
float to_float () const
 

Static Public Member Functions

static unsigned short float_to_half (float float_value)
 
static unsigned short float_to_half_simple (float float_value)
 Only works for 'normal' half-float values. More...
 
static float half_to_float (unsigned short hf)
 
static float half_to_float_simple (unsigned short hf)
 Only works for 'normal' half-float values. More...
 

Constructor & Destructor Documentation

clan::HalfFloat::HalfFloat ( )
inline
clan::HalfFloat::HalfFloat ( const HalfFloat other)
inline
clan::HalfFloat::HalfFloat ( float  v)
inline

Member Function Documentation

static unsigned short clan::HalfFloat::float_to_half ( float  float_value)
inlinestatic

References clan::f.

Referenced by from_float().

static unsigned short clan::HalfFloat::float_to_half_simple ( float  float_value)
inlinestatic

Only works for 'normal' half-float values.

References clan::f.

HalfFloat& clan::HalfFloat::from_float ( float  v)
inline

References float_to_half().

Referenced by operator=().

static float clan::HalfFloat::half_to_float ( unsigned short  hf)
inlinestatic

Referenced by to_float().

static float clan::HalfFloat::half_to_float_simple ( unsigned short  hf)
inlinestatic

Only works for 'normal' half-float values.

clan::HalfFloat::operator float ( ) const
inline

References to_float().

HalfFloat& clan::HalfFloat::operator= ( const HalfFloat other)
inline
HalfFloat& clan::HalfFloat::operator= ( const float  v)
inline

References from_float().

float clan::HalfFloat::to_float ( ) const
inline

References half_to_float().

Referenced by operator float().


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