mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-27 06:10:14 -04:00
More matrix related clean-ups.
This commit is contained in:
parent
238f577e6f
commit
064d632d65
3 changed files with 9 additions and 10 deletions
src/basic
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue