approximatelyEqual
Checks if two numbers are approximately equal to each other.
- Use Math.abs()to compare the absolute difference of the two values toepsilon.
- Omit the third argument, epsilon, to use a default value of0.001.
Checks if two numbers are approximately equal to each other.
Math.abs() to compare the absolute difference of the two values to epsilon.epsilon, to use a default value of 0.001.