XMHALF2::XMHALF2(float,float) function (directxpackedvector.h)
Initializes a new instance of XMHALF2
from two float
arguments.
This constructor initializes a new instance of XMHALF2 from two
float
arguments.
Syntax
void XMHALF2(
float _x,
float _y
) noexcept;
Parameters
_x
Value of the x-coordinate of the vector, the x member of the new
XMHALF2
instance.
_y
Value of the y-coordinate of the vector, the y member of the new
XMHALF2
instance.
Return value
None
Remarks
If the magnitude of one of this constructor's floating point arguments cannot be
represented by the HALF
type, the corresponding member of the new instance of
XMHALF2
will be infinity for a 16-bit integer (+0x7FFF).
The following pseudocode demonstrates the operation of this constructor using the XNA Math XMConvertFloatToHalf function:
XMHALF2 instance;
instance.x = XMConvertFloatToHalf(_x);
instance.y = XMConvertFloatToHalf(_y);
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | directxpackedvector.h |
See also
Reference