You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Structs, Records, Enums > Dew.Math.TCompare Enumeration
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
Dew.Math.TCompare Enumeration

Comparison type for the Equal function.

Syntax
C#
Visual Basic
public enum TCompare : uint { cmpAbsolute, cmpRelative }

Math387.cs

Members 
Description 
cmpAbsolute 
a and b are equal, if the following expression is true:
abs(a-b) < Tolerance.  
cmpRelative 
a and b are equal, if the following expression is true:
abs(a-b)/Max( abs(a),abs(b) ) <= Tolerance
This method also requires a special "zero tolerance" parameter, which determines how small must a number be so that it can be considered to be zero.  

Determines the method used to compare two floating point numbers in order to determine if they are equal or not within some tolerance.

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!