UNPKG

phaser

Version:

A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers from the team at Phaser Studio Inc.

27 lines (23 loc) 616 B
/** * @author Richard Davey <rich@phaser.io> * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Wrap = require('../Wrap'); /** * Wrap an angle in degrees. * * Wraps the angle to a value in the range of -180 to 180. * * @function Phaser.Math.Angle.WrapDegrees * @since 3.0.0 * * @param {number} angle - The angle to wrap, in degrees. * * @return {number} The wrapped angle, in degrees. */ var WrapDegrees = function (angle) { return Wrap(angle, -180, 180); }; module.exports = WrapDegrees;