Added RandomDataGenerator.between (an alias for integerInRange)

This commit is contained in:
photonstorm 2014-06-06 04:12:35 +01:00
parent 622978fa77
commit 7836f3acd9

View file

@ -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.
* *