Source
Matrix cloneInvert() { num det = this.det; num a = this.d / det; num b = - this.b / det; num c = - this.c / det; num d = this.a / det; num tx = - this.tx * a - this.ty * c; num ty = - this.tx * b - this.ty * d; return new Matrix(a, b, c, d, tx, ty); }