Describes a 4D vector consisting of four half-precision (16-bit) floating-point values.
If you are programming in C++, you can use the constructors and operator methods of this structure.
Note See DirectXMath Library Type Equivalences for information about equivalent D3DDECLTYPE, D3DFORMAT, and DXGI_FORMAT objects.
struct XMHALF4
The fields in the XMHALF4 structure are declared as follows:
struct XMHALF4
{
union
{
struct
{
HALF x; // HALF value describing the x-coordinate.
HALF y; // HALF value describing the y-coordinate.
HALF z; // HALF value describing the z-coordinate.
HALF w; // HALF value describing the w-coordinate.
};
uint64_t v; // Unsigned 64-bit integer representing the 4D vector.
};
The definition of the HALF type used under DirectXMath is consistent with the IEEE standard, and consists of a sign bit, a 5 bit biased exponent, and a 10 bit mantissa:
[15] SEEEEEMMMMMMMMMM [0]
XMHALF4 can be loaded into instances of XMVECTOR by using XMLoadHalf4.
Instances of XMVECTOR can be stored into an instance of XMHALF4 with XMStoreHalf4.
Namespace: Use DirectX::PackedVector
Header: Declared in directxpackedvector.h.