Skip to main content
The Accuracy class provides methods for comparing lengths and angles. The CompareLengths method takes two arguments, lengthA and lengthB, and returns an integer result:
  • -1 lengthA is less than lengthB.
  • 0 lengthA is equal to lengthB to within linear resolution.
  • +1 lengthA is greater than lengthB.
This method provides general comparison of two lengths, but for common situations, such as comparing with zero, or testing whether two values are equal, simpler and more readable methods can be used:
Corresponding methods are provided for angles: CompareAngles, EqualAngles, AngleIsZero, AngleIsPositive, and AngleIsNegative.