Should be between -180, 180 #5075

This commit is contained in:
Richard Davey 2020-04-27 10:23:55 +01:00
parent 92e4345c0e
commit 8733847842

View file

@ -1,7 +1,14 @@
/**
* @author Richard Davey <rich@photonstorm.com>
* @author @samme
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
var FloatBetween = require('../FloatBetween');
/**
* Returns a random angle in the range [0, 360].
* Returns a random angle in the range [-180, 180].
*
* @function Phaser.Math.Angle.RandomDegrees
* @since 3.23.0
@ -10,7 +17,7 @@ var FloatBetween = require('../FloatBetween');
*/
var RandomDegrees = function ()
{
return FloatBetween(0, 360);
return FloatBetween(-180, 180);
};
module.exports = RandomDegrees;