is-practically-equal
Determine whether two numbers are practically equal.
Parameters:
Name | Type | Description |
---|---|---|
a | Number | A number. |
b | Number | Another number. |
tolerance | Number | The acceptable tolerance. |
Returns:
Boolean Whether the numbers are practically equal or not.
Example:
isPracticallyEqual(0.15 + 0.15, 0.1 + 0.2, Number.EPSILON)
// → true