Skip to content

Commit 5c6eab8

Browse files
committed
Swapped to the shorter 'between' method.
1 parent 2b0abb6 commit 5c6eab8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/core/World.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,11 @@ Object.defineProperty(Phaser.World.prototype, "randomX", {
308308

309309
if (this.bounds.x < 0)
310310
{
311-
return this.game.rnd.integerInRange(this.bounds.x, (this.bounds.width - Math.abs(this.bounds.x)));
311+
return this.game.rnd.between(this.bounds.x, (this.bounds.width - Math.abs(this.bounds.x)));
312312
}
313313
else
314314
{
315-
return this.game.rnd.integerInRange(this.bounds.x, this.bounds.width);
315+
return this.game.rnd.between(this.bounds.x, this.bounds.width);
316316
}
317317

318318
}
@@ -330,11 +330,11 @@ Object.defineProperty(Phaser.World.prototype, "randomY", {
330330

331331
if (this.bounds.y < 0)
332332
{
333-
return this.game.rnd.integerInRange(this.bounds.y, (this.bounds.height - Math.abs(this.bounds.y)));
333+
return this.game.rnd.between(this.bounds.y, (this.bounds.height - Math.abs(this.bounds.y)));
334334
}
335335
else
336336
{
337-
return this.game.rnd.integerInRange(this.bounds.y, this.bounds.height);
337+
return this.game.rnd.between(this.bounds.y, this.bounds.height);
338338
}
339339

340340
}

0 commit comments

Comments
 (0)