mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-26 21:59:46 -04:00
Streamline various #equals() methods.
This commit is contained in:
parent
4a8469b740
commit
2196ef2a74
5 changed files with 13 additions and 8 deletions
src/basic
|
@ -110,8 +110,10 @@ var Matrix = Base.extend(/** @lends Matrix# */{
|
|||
* @return {Boolean} {@true if the matrices are equal}
|
||||
*/
|
||||
equals: function(mx) {
|
||||
return mx && this._a == mx._a && this._b == mx._b && this._c == mx._c
|
||||
&& this._d == mx._d && this._tx == mx._tx && this._ty == mx._ty;
|
||||
return mx === this || mx && this._a == mx._a && this._b == mx._b
|
||||
&& this._c == mx._c && this._d == mx._d && this._tx == mx._tx
|
||||
&& this._ty == mx._ty
|
||||
|| false;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue