Colobot
|
half-precision floating point type More...
#include <src/math/half.h>
Public Member Functions | |
half () | |
Default constructor. More... | |
half (const half &other) | |
Copy constructor. More... | |
half & | operator= (const half &other) |
Copy operator. More... | |
half (int value) | |
Conversion constructor from int. More... | |
half (float value) | |
Conversion constructor from float. More... | |
operator int () const | |
Conversion operator to int. More... | |
operator float () const | |
Conversion operator to float. More... | |
Public Attributes | |
uint16_t | bits |
16-bit binary representation of half-float More... | |
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.
|
inline |
Default constructor.
|
inline |
Copy constructor.
|
inlineexplicit |
Conversion constructor from int.
|
inlineexplicit |
Conversion constructor from float.
|
inlineexplicit |
Conversion operator to int.
|
inlineexplicit |
Conversion operator to float.
uint16_t Math::half::bits |
16-bit binary representation of half-float