XMHALF4::XMHALF4(float,float,float,float) function (directxpackedvector.h)
Initializes a new instance of XMHALF4
from four float
arguments.
This constructor initializes a new instance of XMHALF4 from four
float
arguments.
Syntax
void XMHALF4(
float _x,
float _y,
float _z,
float _w
) noexcept;
Parameters
_x
Value of the x-coordinate of the vector, the x member of the new
XMHALF4
instance.
_y
Value of the y-coordinate of the vector, the y member of the new
XMHALF4
instance.
_z
Value of the z-coordinate of the vector, the z member of the new
XMHALF4
instance.
_w
Value of the w-coordinate of the vector, the w member of the new
XMHALF4
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
XMHALF4
will be infinity for a 16-bit integer (+0x7FFF).
The following pseudocode demonstrates the operation of this constructor using the XNA Math XMConvertFloatToHalf function:
XMHALF4 instance;
instance.x = XMConvertFloatToHalf(_x);
instance.y = XMConvertFloatToHalf(_y);
instance.z = XMConvertFloatToHalf(_z);
instance.w = XMConvertFloatToHalf(_w);
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | directxpackedvector.h |
See also
Reference