diff --git a/src/math/RandomDataGenerator.js b/src/math/RandomDataGenerator.js index d6abfdeb4..45070dc83 100644 --- a/src/math/RandomDataGenerator.js +++ b/src/math/RandomDataGenerator.js @@ -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. *