mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Should be between -180, 180 #5075
This commit is contained in:
parent
92e4345c0e
commit
8733847842
1 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue