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  

Defined in

Last Updated: 20 September, 2019