From 627a63cc5b2f3564cc9e2c112da0be572700094e Mon Sep 17 00:00:00 2001 From: sapics Date: Tue, 19 Jan 2016 16:08:39 +0900 Subject: [PATCH] Fix matrix invert calculation --- src/basic/Matrix.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/basic/Matrix.js b/src/basic/Matrix.js index 485ea730..fec72c66 100644 --- a/src/basic/Matrix.js +++ b/src/basic/Matrix.js @@ -442,10 +442,11 @@ var Matrix = Base.extend(/** @lends Matrix# */{ if (det) { this._tx = (this._b * ty - this._d * tx) / det; this._ty = (this._c * tx - this._a * ty) / det; - this._d /= det; + var d = this._a / det; + this._a = this._d / det; this._c /= -det; this._b /= -det; - this._a /= det; + this._d = d; res = this; } return res;