half-precision floating point type
More...
#include <src/math/half.h>
|
| half () |
| Default constructor.
|
|
| half (const half &other) |
| Copy constructor.
|
|
half & | operator= (const half &other) |
| Copy operator.
|
|
| half (int value) |
| Conversion constructor from int.
|
|
| half (float value) |
| Conversion constructor from float.
|
|
| operator int () const |
| Conversion operator to int.
|
|
| operator float () const |
| Conversion operator to float.
|
|
|
uint16_t | bits |
| 16-bit binary representation of half-float
|
|
half-precision floating point type
Represents a half-precision floating point value. Contains the required methods for converting to and from ints and floats.
This type is for storage only. Conversion is expensive and should be avoided if possible.
◆ half() [1/4]
◆ half() [2/4]
Math::half::half |
( |
const half & |
other | ) |
|
|
inline |
◆ half() [3/4]
Math::half::half |
( |
int |
value | ) |
|
|
inlineexplicit |
Conversion constructor from int.
◆ half() [4/4]
Math::half::half |
( |
float |
value | ) |
|
|
inlineexplicit |
Conversion constructor from float.
◆ operator=()
half & Math::half::operator= |
( |
const half & |
other | ) |
|
|
inline |
◆ operator int()
Math::half::operator int |
( |
| ) |
const |
|
inlineexplicit |
Conversion operator to int.
◆ operator float()
Math::half::operator float |
( |
| ) |
const |
|
inlineexplicit |
Conversion operator to float.
◆ bits
uint16_t Math::half::bits |
16-bit binary representation of half-float
The documentation for this struct was generated from the following file: