Rename Matrix#setIdentity() to #reset() and document it.

This commit is contained in:
Jürg Lehni 2013-02-09 11:45:33 -08:00
parent 9aaa864f81
commit cd9fc39f54
2 changed files with 7 additions and 3 deletions
src/basic

View file

@ -64,7 +64,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
ok = false;
}
} else if (count == 0) {
this.setIdentity();
this.reset();
} else {
ok = false;
}
@ -105,7 +105,11 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
return this;
},
setIdentity: function() {
/**
* "Resets" the matrix by setting its values to the ones of the identity
* matrix that results in no transformation.
*/
reset: function() {
this._a = this._d = 1;
this._c = this._b = this._tx = this._ty = 0;
return this;