More matrix related clean-ups.

This commit is contained in:
Jürg Lehni 2013-12-08 22:12:36 +01:00
parent 238f577e6f
commit 064d632d65
3 changed files with 9 additions and 10 deletions
src/basic

View file

@ -373,6 +373,10 @@ var Matrix = Base.extend(/** @lends Matrix# */{
&& this._tx === 0 && this._ty === 0;
},
orNullIfIdentity: function() {
return this.isIdentity() ? null : this;
},
/**
* Returns whether the transform is invertible. A transform is not
* invertible if the determinant is 0 or any value is non-finite or NaN.