Skip to content

Commit f0d7da1

Browse files
committed
Removed RND.float as it's a reserved word :(
Fixed jshint errors.
1 parent b14510d commit f0d7da1

3 files changed

Lines changed: 3 additions & 19 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
266266
* JSDoc typo fixes (thanks @rwrountree)
267267
* Math.average has been optimized (thanks @rwrountree #2025)
268268
* Change splice.call(arguments, ..) to use slice instead (thanks @pnstickne #2034 #2032)
269-
* RandomDataGenerator.float is a new alias for the method 'realInRange' and takes the same arguments.
270269

271270
### Bug Fixes
272271

src/math/RandomDataGenerator.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -203,21 +203,6 @@ Phaser.RandomDataGenerator.prototype = {
203203

204204
},
205205

206-
/**
207-
* Returns a random real number between min and max.
208-
* This method is an alias for RandomDataGenerator.realInRange.
209-
*
210-
* @method Phaser.RandomDataGenerator#float
211-
* @param {number} min - The minimum value in the range.
212-
* @param {number} max - The maximum value in the range.
213-
* @return {number} A random number between min and max.
214-
*/
215-
float: function (min, max) {
216-
217-
return this.realInRange(min, max);
218-
219-
},
220-
221206
/**
222207
* Returns a random real number between min and max.
223208
*

src/particles/arcade/Emitter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,11 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function (x, y, key, fr
613613
}
614614
else if (this.minParticleScale !== 1 || this.maxParticleScale !== 1)
615615
{
616-
particle.scale.set(rnd.float(this.minParticleScale, this.maxParticleScale));
616+
particle.scale.set(rnd.realInRange(this.minParticleScale, this.maxParticleScale));
617617
}
618618
else if ((this._minParticleScale.x !== this._maxParticleScale.x) || (this._minParticleScale.y !== this._maxParticleScale.y))
619619
{
620-
particle.scale.set(rnd.float(this._minParticleScale.x, this._maxParticleScale.x), rnd.float(this._minParticleScale.y, this._maxParticleScale.y));
620+
particle.scale.set(rnd.realInRange(this._minParticleScale.x, this._maxParticleScale.x), rnd.realInRange(this._minParticleScale.y, this._maxParticleScale.y));
621621
}
622622

623623
if (frame === undefined)
@@ -638,7 +638,7 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function (x, y, key, fr
638638
}
639639
else
640640
{
641-
particle.alpha = rnd.float(this.minParticleAlpha, this.maxParticleAlpha);
641+
particle.alpha = rnd.realInRange(this.minParticleAlpha, this.maxParticleAlpha);
642642
}
643643

644644
particle.blendMode = this.blendMode;

0 commit comments

Comments
 (0)