mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Merge pull request #915 from sapics/matrix-invert
Fix matrix invert calculation
This commit is contained in:
commit
ceaf168f8c
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