mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-20 18:10:03 -04:00
Fix all tests for Matrix decomposition.
This commit is contained in:
parent
e438ac8223
commit
aec13ffd43
2 changed files with 34 additions and 51 deletions
src/basic
|
@ -471,6 +471,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
|
|||
decompose: function() {
|
||||
// http://dev.w3.org/csswg/css3-2d-transforms/#matrix-decomposition
|
||||
// http://stackoverflow.com/questions/4361242/
|
||||
// https://github.com/wisec/DOMinator/blob/master/layout/style/nsStyleAnimation.cpp#L946
|
||||
var a = this._a, b = this._b, c = this._c, d = this._d;
|
||||
if (Numerical.isZero(a * d - b * c))
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue