mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Added RandomDataGenerator.between (an alias for integerInRange)
This commit is contained in:
parent
622978fa77
commit
7836f3acd9
1 changed files with 15 additions and 0 deletions
|
@ -178,6 +178,21 @@ Phaser.RandomDataGenerator.prototype = {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a random integer between and including min and max.
|
||||||
|
* This method is an alias for RandomDataGenerator.integerInRange.
|
||||||
|
*
|
||||||
|
* @method Phaser.RandomDataGenerator#between
|
||||||
|
* @param {number} min - The minimum value in the range.
|
||||||
|
* @param {number} max - The maximum value in the range.
|
||||||
|
* @return {number} A random number between min and max.
|
||||||
|
*/
|
||||||
|
between: function (min, max) {
|
||||||
|
|
||||||
|
return this.integerInRange(min, max);
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a random real number between min and max.
|
* Returns a random real number between min and max.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue