Fix all tests for Matrix decomposition.

This commit is contained in:
Jürg Lehni 2013-02-08 23:25:10 -08:00
parent e438ac8223
commit aec13ffd43
2 changed files with 34 additions and 51 deletions
src/basic

View file

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