XMVectorSet

Creates a vector using four floating-point values.

Syntax

XMVECTOR XMVectorSet(
         float x,
         float y,
         float z,
         float w
)  

Parameters

x
Type: float 

The x component of the vector to return.

y
Type: float 

The y component of the vector to return.

z
Type: float 

The z component of the vector to return.

w
Type: float 

The w component of the vector to return.

Return value

Type: XMVECTOR 

An instance XMVECTOR each of whose four components (x,y,z, and w) is a floating-point number with the same value as the corresponding input argument to XMVectorSet.

Remarks

The following pseudocode demonstrates the operation of the function:

XMVECTOR V;
float x,y,z,w;
V.x = x;
V.y = y;
V.z = z;
V.w = w;

return V;  

Requirements

Header: Declared in directxmath.h.