Removed RND.float as it's a reserved word :(

Fixed jshint errors.
This commit is contained in:
photonstorm 2015-08-27 19:28:01 +01:00
parent b14510d1e7
commit f0d7da1c56
3 changed files with 3 additions and 19 deletions

View file

@ -266,7 +266,6 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
* JSDoc typo fixes (thanks @rwrountree)
* Math.average has been optimized (thanks @rwrountree #2025)
* Change splice.call(arguments, ..) to use slice instead (thanks @pnstickne #2034 #2032)
* RandomDataGenerator.float is a new alias for the method 'realInRange' and takes the same arguments.
### Bug Fixes

View file

@ -203,21 +203,6 @@ Phaser.RandomDataGenerator.prototype = {
},
/**
* Returns a random real number between min and max.
* This method is an alias for RandomDataGenerator.realInRange.
*
* @method Phaser.RandomDataGenerator#float
* @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.
*/
float: function (min, max) {
return this.realInRange(min, max);
},
/**
* Returns a random real number between min and max.
*

View file

@ -613,11 +613,11 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function (x, y, key, fr
}
else if (this.minParticleScale !== 1 || this.maxParticleScale !== 1)
{
particle.scale.set(rnd.float(this.minParticleScale, this.maxParticleScale));
particle.scale.set(rnd.realInRange(this.minParticleScale, this.maxParticleScale));
}
else if ((this._minParticleScale.x !== this._maxParticleScale.x) || (this._minParticleScale.y !== this._maxParticleScale.y))
{
particle.scale.set(rnd.float(this._minParticleScale.x, this._maxParticleScale.x), rnd.float(this._minParticleScale.y, this._maxParticleScale.y));
particle.scale.set(rnd.realInRange(this._minParticleScale.x, this._maxParticleScale.x), rnd.realInRange(this._minParticleScale.y, this._maxParticleScale.y));
}
if (frame === undefined)
@ -638,7 +638,7 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function (x, y, key, fr
}
else
{
particle.alpha = rnd.float(this.minParticleAlpha, this.maxParticleAlpha);
particle.alpha = rnd.realInRange(this.minParticleAlpha, this.maxParticleAlpha);
}
particle.blendMode = this.blendMode;