XMVectorDivide

Divides one instance of XMVECTOR by a second instance, returning the result in a third instance.

The XMVectorDivide divides each component of an instance of XMVECTOR Data Type by the corresponding component in a second instance of XMVECTOR, returning a new XMVECTOR instance containing the result.

Syntax

XMVECTOR XMVectorDivide(
         XMVECTOR V1,
         XMVECTOR V2
)  

Parameters

V1
Type: XMVECTOR 

XMVECTOR instance whose components are the dividends of the division operation.

V2
Type: XMVECTOR 

XMVECTOR instance whose components are the divisors of the division operation.

Return value

Type: XMVECTOR 

XMVECTOR instance whose components are the quotient of the division of each component of V1 by each corresponding component of V2.

Remarks

The following code is generally faster than calling XMVectorDivide if the loss of precision is tolerable.

XMVECTOR R = XMVectorReciprocalEst(V2)    
XMVectorMultiply(V1,R)  

Requirements

Header: Declared in directxmath.h.