Click or drag to resize
Ab4d.SharpEngine logo

MathUtilsIsSame(Single, Single) Method

Checks if a and b are almost equals, taking into account the magnitude of floating point numbers (unlike WithinEpsilon(Single, Single, Single) method). See Remarks. See remarks.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public static bool IsSame(
	float a,
	float b
)

Parameters

a  Single
The left value to compare.
b  Single
The right value to compare.

Return Value

Boolean
true if a almost equal to b, false otherwise
Remarks
The code is using the technique described by Bruce Dawson in Comparing Floating point numbers 2012 edition.
See Also