phaser/src/math/DegToRad.js

24 lines
618 B
JavaScript

/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|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 {integer} degrees - The angle (in degrees) to convert to radians.
*
* @return {float} The given angle converted to radians.
*/
var DegToRad = function (degrees)
{
return degrees * CONST.DEG_TO_RAD;
};
module.exports = DegToRad;