phaser/src/math/DegToRad.js

25 lines
619 B
JavaScript
Raw Normal View History

2018-02-12 16:01:20 +00:00
/**
* @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');
2017-10-06 02:05:01 +00:00
/**
* Convert the given angle from degrees, to the equivalent angle in radians.
2017-10-06 02:05:01 +00:00
*
* @function Phaser.Math.DegToRad
* @since 3.0.0
*
* @param {integer} degrees - The angle (in degrees) to convert to radians.
2017-10-06 02:05:01 +00:00
*
* @return {number} The given angle converted to radians.
2017-10-06 02:05:01 +00:00
*/
var DegToRad = function (degrees)
{
return degrees * CONST.DEG_TO_RAD;
};
module.exports = DegToRad;