jshint fixes.

This commit is contained in:
photonstorm 2015-02-17 18:16:12 +00:00
parent f9eaa4001f
commit f47fb7a7c7
2 changed files with 13 additions and 6 deletions

View file

@ -96,7 +96,11 @@ Phaser.Matrix.prototype.fromArray = function(array)
*/ */
Phaser.Matrix.prototype.toArray = function(transpose) Phaser.Matrix.prototype.toArray = function(transpose)
{ {
if(!this.array) this.array = new PIXI.Float32Array(9); if (!this.array)
{
this.array = new PIXI.Float32Array(9);
}
var array = this.array; var array = this.array;
if (transpose) if (transpose)
@ -141,7 +145,7 @@ Phaser.Matrix.prototype.apply = function(pos, newPos)
newPos = newPos || new Phaser.Point(); newPos = newPos || new Phaser.Point();
var x = pos.x; var x = pos.x;
var y = pos.y var y = pos.y;
newPos.x = this.a * x + this.c * y + this.tx; newPos.x = this.a * x + this.c * y + this.tx;
newPos.y = this.b * x + this.d * y + this.ty; newPos.y = this.b * x + this.d * y + this.ty;

View file

@ -79,9 +79,12 @@ Phaser.RoundedRectangle.prototype.clone = function()
Phaser.RoundedRectangle.prototype.contains = function(x, y) Phaser.RoundedRectangle.prototype.contains = function(x, y)
{ {
if (this.width <= 0 || this.height <= 0) if (this.width <= 0 || this.height <= 0)
{
return false; return false;
}
var x1 = this.x; var x1 = this.x;
if (x >= x1 && x <= x1 + this.width) if (x >= x1 && x <= x1 + this.width)
{ {
var y1 = this.y; var y1 = this.y;