XMHALF2 structure (directxpackedvector.h)
A 2D vector consisting of two half-precision (16bit) floating-point values.
For a list of additional functionality such as constructors and operators that are available
using XMHALF2
when you are programming in C++, see XMHALF2 Extensions.
Syntax
struct XMHALF2 {
union {
struct {
HALF x;
HALF y;
};
uint32_t v;
};
void XMHALF2();
void XMHALF2(
const XMHALF2 & unnamedParam1
);
XMHALF2 & operator=(
const XMHALF2 & unnamedParam1
);
void XMHALF2(
XMHALF2 && unnamedParam1
);
XMHALF2 & operator=(
XMHALF2 && unnamedParam1
);
void XMHALF2(
uint32_t Packed
) noexcept;
void XMHALF2(
HALF _x,
HALF _y
) noexcept;
void XMHALF2(
const HALF *pArray
) noexcept;
void XMHALF2(
float _x,
float _y
) noexcept;
void XMHALF2(
const float *pArray
) noexcept;
XMHALF2 & operator=(
uint32_t Packed
) noexcept;
};
Members
x
HALF value describing the x-coordinate.
y
HALF value describing the y-coordinate.
v
Default constructor for XMHALF2
.
Default constructor for XMHALF2.
void XMHALF2( const XMHALF2 & unnamedParam1)
A constructor for XMHALF2
.
A constructor for XMHALF2.
XMHALF2 & operator=( const XMHALF2 & unnamedParam1)
Assigns the vector component data from one instance of XMHALF2
to the current instance of XMHALF2
.
This operator assigns the vector component data from one instance of XMHALF2 to the current instance of XMHALF2
.
void XMHALF2( XMHALF2 && unnamedParam1)
A constructor for XMHALF2
.
A constructor for XMHALF2.
XMHALF2 & operator=( XMHALF2 && unnamedParam1)
void XMHALF2( uint32_t Packed) noexcept
A constructor for XMHALF2
.
A constructor for XMHALF2.
void XMHALF2( HALF _x, HALF _y) noexcept
Initializes a new instance of XMHALF2
from two HALF
arguments.
This constructor initializes a new instance of XMHALF2 from two
HALF
arguments.
void XMHALF2( const HALF *pArray) noexcept
Initializes a new instance of XMHALF2 from a two element HALF
array argument.
This constructor initializes a new instance of XMHALF2 from a two element HALF
array argument.
void XMHALF2( float _x, float _y) noexcept
Initializes a new instance of XMHALF2
from two float
arguments.
This constructor initializes a new instance of XMHALF2 from two
float
arguments.
void XMHALF2( const float *pArray) noexcept
Initializes a new instance of XMHALF2 from a two element float
array argument.
This constructor initializes a new instance of** XMHALF2** from a two element float
array argument.
XMHALF2 & operator=( uint32_t Packed) noexcept
Remarks
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]
XMHALF2
can be loaded into instances of XMVECTOR by using XMLoadHalf2.
Instances of XMVECTOR
can be stored into an instance of XMHALF2
with XMStoreHalf2.
Namespace: Use DirectX::PackedVector
Platform Requirements
Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.Requirements
Requirement | Value |
---|---|
Header | directxpackedvector.h |