[][src]Function directx_math::XMScalarNearEqual

pub fn XMScalarNearEqual(S1: f32, S2: f32, Epsilon: f32) -> bool

Determines if two floating-point values are nearly equal.

Parameters

S1 First floating-point value to compare.

S2 Second floating-point value to compare.

Epsilon Tolerance to use when comparing S1 and S2.

Return value

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

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxmath/nf-directxmath-XMScalarNearEqual