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,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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue