XMFLOAT2::XMFLOAT2(float,float) function (directxmath.h)

Initializes a new instance of XMFLOAT2 from two float arguments.

This constructor initializes a new instance of XMFLOAT2 from two float arguments.

Note  This constructor is only available under C++.
 

Syntax

void XMFLOAT2(
  float _x,
  float _y
) noexcept;

Parameters

_x

Value of the x-coordinate of the vector, the x member of the new XMFLOAT2 instance.

_y

Value of the y-coordinate of the vector, the y member of the new XMFLOAT2 instance.

Return value

None

Remarks

The following pseudocode demonstrates the operation of this constructor:


	XMFLOAT2 instance;

	instance.x = _x;
	instance.y = _y;

    

Requirements

Requirement Value
Target Platform Windows
Header directxmath.h

See also

Reference

XMFLOAT2

XMFLOAT2 Constructors