mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Fix matrix invert calculation
This commit is contained in:
parent
6a0222ff21
commit
627a63cc5b
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue