Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::lang::HalfFloat Class Reference

A class that emulates a 16-bit floating-point number. More...

#include <omHalfFloat.h>

Public Member Functions

 HalfFloat ()
 Create a HalfFloat object with the value 0. More...
 
 HalfFloat (Byte value)
 Create a HalfFloat object with the value of the specified byte. More...
 
 HalfFloat (Short value)
 Create a HalfFloat object with the value of the specified short number. More...
 
 HalfFloat (Int value)
 Create a HalfFloat object with the value of the specified int number. More...
 
 HalfFloat (Long value)
 Create a HalfFloat object with the value of the specified long number. More...
 
 HalfFloat (LongLong value)
 Create a HalfFloat object with the value of the specified long-long number. More...
 
 HalfFloat (Float value)
 Create a HalfFloat object with the value of the specified float number. More...
 
 HalfFloat (Double value)
 Create a HalfFloat object with the value of the specified double number. More...
 
HalfFloatoperator+= (const HalfFloat &other)
 Add another HalfFloat to this half float's value. More...
 
HalfFloatoperator-= (const HalfFloat &other)
 Subtract another HalfFloat from this half float's value. More...
 
HalfFloatoperator*= (const HalfFloat &other)
 Multiply this half float's value by another HalfFloat. More...
 
HalfFloatoperator/= (const HalfFloat &other)
 Divide this half float's value by another HalfFloat. More...
 
HalfFloat operator+ (const HalfFloat &other)
 Add another HalfFloat to this half float's value. More...
 
HalfFloat operator- (const HalfFloat &other)
 Subtract another HalfFloat from this half float's value. More...
 
HalfFloat operator* (const HalfFloat &other)
 Multiply this half float's value by another HalfFloat. More...
 
HalfFloat operator/ (const HalfFloat &other)
 Divide this half float's value by another HalfFloat. More...
 
 operator Float () const
 Cast the half float object to a single-precision floating point number. More...
 

Detailed Description

A class that emulates a 16-bit floating-point number.

The class includes operator overloads for all standard arithmetic operators, though the performance of these may be undesirable for intensive calculations because they are emulated in software.

Constructor & Destructor Documentation

om::lang::HalfFloat::HalfFloat ( )
inline

Create a HalfFloat object with the value 0.

om::lang::HalfFloat::HalfFloat ( Byte  value)
inline

Create a HalfFloat object with the value of the specified byte.

om::lang::HalfFloat::HalfFloat ( Short  value)
inline

Create a HalfFloat object with the value of the specified short number.

om::lang::HalfFloat::HalfFloat ( Int  value)
inline

Create a HalfFloat object with the value of the specified int number.

om::lang::HalfFloat::HalfFloat ( Long  value)
inline

Create a HalfFloat object with the value of the specified long number.

om::lang::HalfFloat::HalfFloat ( LongLong  value)
inline

Create a HalfFloat object with the value of the specified long-long number.

om::lang::HalfFloat::HalfFloat ( Float  value)
inline

Create a HalfFloat object with the value of the specified float number.

om::lang::HalfFloat::HalfFloat ( Double  value)
inline

Create a HalfFloat object with the value of the specified double number.

Member Function Documentation

HalfFloat& om::lang::HalfFloat::operator+= ( const HalfFloat other)
inline

Add another HalfFloat to this half float's value.

HalfFloat& om::lang::HalfFloat::operator-= ( const HalfFloat other)
inline

Subtract another HalfFloat from this half float's value.

HalfFloat& om::lang::HalfFloat::operator*= ( const HalfFloat other)
inline

Multiply this half float's value by another HalfFloat.

HalfFloat& om::lang::HalfFloat::operator/= ( const HalfFloat other)
inline

Divide this half float's value by another HalfFloat.

HalfFloat om::lang::HalfFloat::operator+ ( const HalfFloat other)
inline

Add another HalfFloat to this half float's value.

HalfFloat om::lang::HalfFloat::operator- ( const HalfFloat other)
inline

Subtract another HalfFloat from this half float's value.

HalfFloat om::lang::HalfFloat::operator* ( const HalfFloat other)
inline

Multiply this half float's value by another HalfFloat.

HalfFloat om::lang::HalfFloat::operator/ ( const HalfFloat other)
inline

Divide this half float's value by another HalfFloat.

om::lang::HalfFloat::operator Float ( ) const
inline

Cast the half float object to a single-precision floating point number.


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