Skip to content

Commit 78ec29f

Browse files
committed
RandomDataGenerator.integerInRange would return a non-integer value if you passed in a float.
1 parent e06f249 commit 78ec29f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/math/RandomDataGenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Phaser.RandomDataGenerator.prototype = {
174174
*/
175175
integerInRange: function (min, max) {
176176

177-
return Math.floor(this.realInRange(0, max - min + 1)) + min;
177+
return Math.floor(this.realInRange(0, max - min + 1) + min);
178178

179179
},
180180

0 commit comments

Comments
 (0)