Skip to content

Commit 97ebfce

Browse files
committed
Fixed Matrix.apply.
1 parent 0dbcf88 commit 97ebfce

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/geom/Matrix.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,11 @@ Phaser.Matrix.prototype.apply = function(pos, newPos)
140140
{
141141
newPos = newPos || new Phaser.Point();
142142

143-
newPos.x = this.a * pos.x + this.c * pos.y + this.tx;
144-
newPos.y = this.b * pos.x + this.d * pos.y + this.ty;
143+
var x = pos.x;
144+
var y = pos.y
145+
146+
newPos.x = this.a * x + this.c * y + this.tx;
147+
newPos.y = this.b * x + this.d * y + this.ty;
145148

146149
return newPos;
147150
};

0 commit comments

Comments
 (0)