diff --git a/src/basic/Matrix.js b/src/basic/Matrix.js index 31704908..1c1cdbe0 100644 --- a/src/basic/Matrix.js +++ b/src/basic/Matrix.js @@ -492,6 +492,17 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{ ? angle1 * 180 / Math.PI : undefined; }, + /** + * Checks whether the two matrices describe the same transformation. + * + * @param {Matrix} matrix the matrix to compare this matrix to + * @return {Boolean} {@true if the matrices are equal} + */ + equals: function(mx) { + return 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 {Boolean} Whether this transform is the identity transform */