Skip to content

Commit e52e9ff

Browse files
committed
Documented a few more Matrix descriptions. Fixed Matrix4.makeRotationAxis().
1 parent f45ab89 commit e52e9ff

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/math/Matrix3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ var Matrix3 = new Class({
260260
},
261261

262262
/**
263-
* [description]
263+
* Calculate the adjoint, or adjugate, of this Matrix.
264264
*
265265
* @method Phaser.Math.Matrix3#adjoint
266266
* @since 3.0.0

src/math/Matrix4.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ var Matrix4 = new Class({
378378
},
379379

380380
/**
381-
* [description]
381+
* Calculate the adjoint, or adjugate, of this Matrix.
382382
*
383383
* @method Phaser.Math.Matrix4#adjoint
384384
* @since 3.0.0
@@ -660,13 +660,13 @@ var Matrix4 = new Class({
660660
},
661661

662662
/**
663-
* [description]
663+
* Derive a rotation matrix around the given axis.
664664
*
665665
* @method Phaser.Math.Matrix4#makeRotationAxis
666666
* @since 3.0.0
667667
*
668-
* @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - [description]
669-
* @param {float} angle - The angle of rotation in radians.
668+
* @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.
669+
* @param {float} angle - The rotation angle in radians.
670670
*
671671
* @return {Phaser.Math.Matrix4} This Matrix4.
672672
*/
@@ -683,13 +683,12 @@ var Matrix4 = new Class({
683683
var tx = t * x;
684684
var ty = t * y;
685685

686-
// TODO: Fix by using fromArray(), or change set() to accept individual values
687-
this.set(
686+
this.fromArray([
688687
tx * x + c, tx * y - s * z, tx * z + s * y, 0,
689688
tx * y + s * z, ty * y + c, ty * z - s * x, 0,
690689
tx * z - s * y, ty * z + s * x, t * z * z + c, 0,
691690
0, 0, 0, 1
692-
);
691+
]);
693692

694693
return this;
695694
},

0 commit comments

Comments
 (0)