API Reference > bentleyjs-core > Utils > compareWithTolerance compareWithTolerance Function An OrderedComparator for numbers that treats two numbers as equal if the absolute value of their difference is less than a specified tolerance. compareWithTolerance(a: number, b: number, tolerance: number = 0.1): number Parameter Type Description a number b number tolerance number Returns - number Defined in core/bentley/src/Compare.ts Line 35 Last Updated: 15 June, 2021