Om
1.0.0
A universal framework for multimedia simulation
|
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... | |
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... | |
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... | |
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.
|
inline |
Create a HalfFloat object with the value 0.
|
inline |
Create a HalfFloat object with the value of the specified byte.
|
inline |
Create a HalfFloat object with the value of the specified short number.
|
inline |
Create a HalfFloat object with the value of the specified int number.
|
inline |
Create a HalfFloat object with the value of the specified long number.
|
inline |
Create a HalfFloat object with the value of the specified long-long number.
|
inline |
Create a HalfFloat object with the value of the specified float number.
|
inline |
Create a HalfFloat object with the value of the specified double number.
Add another HalfFloat to this half float's value.
Subtract another HalfFloat from this half float's value.
Multiply this half float's value by another HalfFloat.
Divide this half float's value by another HalfFloat.
Add another HalfFloat to this half float's value.
Subtract another HalfFloat from this half float's value.
Multiply this half float's value by another HalfFloat.
Divide this half float's value by another HalfFloat.
|
inline |
Cast the half float object to a single-precision floating point number.