within(a, b, tolerance) → {boolean}
Checks if two values are within the given tolerance of each other.
Parameters
Name | Type | Description |
---|---|---|
a | number | The first number to check |
b | number | The second number to check |
tolerance | number | The tolerance. Anything equal to or less than this is considered within the range. |
Returns
boolean -
True if a is <= tolerance of b.
- Source code: math/Math.js (Line 1069)
- See
-
- Phaser.Math.fuzzyEqual
Please login to continue.