arcade-physics
Version:
Use Arcade Physics without Phaser.
23 lines • 784 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 });
/**
* Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.
*
* @function Phaser.Math.FloatBetween
* @since 3.0.0
*
* @param {number} min - The lower bound for the float, inclusive.
* @param {number} max - The upper bound for the float exclusive.
*
* @return {number} A random float within the given range.
*/
const FloatBetween = (min, max) => {
return Math.random() * (max - min) + min;
};
exports.default = FloatBetween;
//# sourceMappingURL=FloatBetween.js.map