arcade-physics
Version:
Use Arcade Physics without Phaser.
29 lines • 877 B
JavaScript
;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Check whether `a` is fuzzily greater than `b`.
*
* `a` is fuzzily greater than `b` if it is more than `b - epsilon`.
*
* @function Phaser.Math.Fuzzy.GreaterThan
* @since 3.0.0
*
* @param {number} a - The first value.
* @param {number} b - The second value.
* @param {number} [epsilon=0.0001] - The epsilon.
*
* @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.
*/
const GreaterThan = (a, b, epsilon) => {
if (epsilon === undefined) {
epsilon = 0.0001;
}
return a > b - epsilon;
};
exports.default = GreaterThan;
//# sourceMappingURL=GreaterThan.js.map