mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
jshint fixes.
This commit is contained in:
parent
f9eaa4001f
commit
f47fb7a7c7
2 changed files with 13 additions and 6 deletions
|
@ -96,10 +96,14 @@ Phaser.Matrix.prototype.fromArray = function(array)
|
|||
*/
|
||||
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;
|
||||
|
||||
if(transpose)
|
||||
if (transpose)
|
||||
{
|
||||
array[0] = this.a;
|
||||
array[1] = this.b;
|
||||
|
@ -141,7 +145,7 @@ Phaser.Matrix.prototype.apply = function(pos, newPos)
|
|||
newPos = newPos || new Phaser.Point();
|
||||
|
||||
var x = pos.x;
|
||||
var y = pos.y
|
||||
var y = pos.y;
|
||||
|
||||
newPos.x = this.a * x + this.c * y + this.tx;
|
||||
newPos.y = this.b * x + this.d * y + this.ty;
|
||||
|
|
|
@ -78,15 +78,18 @@ Phaser.RoundedRectangle.prototype.clone = function()
|
|||
*/
|
||||
Phaser.RoundedRectangle.prototype.contains = function(x, y)
|
||||
{
|
||||
if(this.width <= 0 || this.height <= 0)
|
||||
if (this.width <= 0 || this.height <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var x1 = this.x;
|
||||
if(x >= x1 && x <= x1 + this.width)
|
||||
|
||||
if (x >= x1 && x <= x1 + this.width)
|
||||
{
|
||||
var y1 = this.y;
|
||||
|
||||
if(y >= y1 && y <= y1 + this.height)
|
||||
if (y >= y1 && y <= y1 + this.height)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue