XMScalarNearEqual

Determines if two floating-point values are nearly equal.

Syntax

bool XMScalarNearEqual(
         float S1,
         float S2,
         float Epsilon
)  

Parameters

S1
Type: float 

First floating-point value to compare.

S2
Type: float 

Second floating-point value to compare.

Epsilon
Type: float 

Tolerance to use when comparing S1 and S2.

Return value

Type: bool 

Returns true if the absolute value of the difference between S1 and S2 is less than or equal to Epsilon. Returns false otherwise.

Requirements

Header: Declared in directxmath.h.