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

Last Updated: 15 June, 2021