XMFLOAT2 structure (directxmath.h)
A 2D vector consisting of two single-precision floating-point values.
For a list of additional functionality such as constructors and operators that are available using XMFLOAT2
when you
are programming in C++, see XMFLOAT2 Extensions.
struct XMFLOAT2 {
float x;
float y;
void XMFLOAT2();
void XMFLOAT2(
const XMFLOAT2 & unnamedParam1
);
XMFLOAT2 & operator=(
const XMFLOAT2 & unnamedParam1
);
void XMFLOAT2(
XMFLOAT2 && unnamedParam1
);
XMFLOAT2 & operator=(
XMFLOAT2 && unnamedParam1
);
void XMFLOAT2(
float _x,
float _y
) noexcept;
void XMFLOAT2(
const float *pArray
) noexcept;
bool operator==(
const XMFLOAT2 & unnamedParam1
);
auto operator<=>(
const XMFLOAT2 & unnamedParam1
);
};
x
float value describing the x-coordinate of the vector.
y
float value describing the y-coordinate of the vector.
Default constructor for XMFLOAT2
.
Default constructor for XMFLOAT2.
void XMFLOAT2( const XMFLOAT2 & unnamedParam1)
A constructor for XMFLOAT2
.
A constructor for XMFLOAT2.
XMFLOAT2 & operator=( const XMFLOAT2 & unnamedParam1)
Assigns the vector component data from one instance of XMFLOAT2
to the current instance of XMFLOAT2
.
This operator assigns the vector component data from one instance of XMFLOAT2 to the current instance of XMFLOAT2
.
void XMFLOAT2( XMFLOAT2 && unnamedParam1)
A constructor for XMFLOAT2
.
A constructor for XMFLOAT2.
XMFLOAT2 & operator=( XMFLOAT2 && unnamedParam1)
void XMFLOAT2( float _x, float _y) noexcept
Initializes a new instance of XMFLOAT2
from two float
arguments.
This constructor initializes a new instance of XMFLOAT2 from two
float
arguments.
void XMFLOAT2( const float *pArray) noexcept
Initializes a new instance of XMFLOAT2
from a two element float
array
argument.
This constructor initializes a new instance of XMFLOAT2 from a from
a two element float
array argument.
bool operator==( const XMFLOAT2 & unnamedParam1)
auto operator<=>( const XMFLOAT2 & unnamedParam1)
XMFLOAT2
can be loaded into instances of XMVECTOR by using
XMLoadFloat2.
Instances of XMVECTOR
can be stored into an instance of XMFLOAT2
with
XMStoreFloat2.
Namespace: Use DirectX
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.Requirement | Value |
---|---|
Header | directxmath.h |