XMVector2NearEqual

Tests whether one 2D vector is near another 2D vector.

Syntax

bool XMVector2NearEqual(
         XMVECTOR V1,
         XMVECTOR V2,
         XMVECTOR Epsilon
)  

Parameters

V1
Type: XMVECTOR 

2D vector.

V2
Type: XMVECTOR 

2D vector.

Epsilon
Type: XMVECTOR 

Tolerance value used for judging equality.

Return value

Type: bool 

Returns true if the difference between components is less than Epsilon; returns false otherwise.

Remarks

The following pseudocode demonstrates the operation of the function:

return ( ( abs( V1.x - V2.x ) <= Epsilon ) && 
         ( abs( V1.y - V2.y ) <= Epsilon ) );  

Requirements

Header: Declared in directxmath.h.