Merge pull request #915 from sapics/matrix-invert

Fix matrix invert calculation
This commit is contained in:
Jürg Lehni 2016-01-19 09:58:52 +01:00
commit ceaf168f8c

View file

@ -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;