mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 12:03:36 +00:00
24 lines
592 B
JavaScript
24 lines
592 B
JavaScript
/**
|
|
* @author Richard Davey <rich@photonstorm.com>
|
|
* @copyright 2022 Photon Storm Ltd.
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
|
*/
|
|
|
|
var CONST = require('./const');
|
|
|
|
/**
|
|
* Convert the given angle from degrees, to the equivalent angle in radians.
|
|
*
|
|
* @function Phaser.Math.DegToRad
|
|
* @since 3.0.0
|
|
*
|
|
* @param {number} degrees - The angle (in degrees) to convert to radians.
|
|
*
|
|
* @return {number} The given angle converted to radians.
|
|
*/
|
|
var DegToRad = function (degrees)
|
|
{
|
|
return degrees * CONST.DEG_TO_RAD;
|
|
};
|
|
|
|
module.exports = DegToRad;
|