arcade-physics
Version:
Use Arcade Physics without Phaser.
28 lines • 840 B
JavaScript
;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Wrap_1 = __importDefault(require("../Wrap"));
/**
* Wrap an angle.
*
* Wraps the angle to a value in the range of -PI to PI.
*
* @function Phaser.Math.Angle.Wrap
* @since 3.0.0
*
* @param {number} angle - The angle to wrap, in radians.
*
* @return {number} The wrapped angle, in radians.
*/
const Wrap = angle => {
return (0, Wrap_1.default)(angle, -Math.PI, Math.PI);
};
exports.default = Wrap;
//# sourceMappingURL=Wrap.js.map