aboutsummaryrefslogtreecommitdiff
path: root/js/lib/math
diff options
context:
space:
mode:
authorAnanya Sen2012-06-19 11:00:49 -0700
committerAnanya Sen2012-06-19 11:00:49 -0700
commitf1d8401aeb84e0eb0680caf72878dae26fd78a37 (patch)
tree31771ccaf3d1e2ddf01fa9605438d20be0d155d7 /js/lib/math
parent9ea2610cec6569e7b7d5268b6c65bbf94c4753e5 (diff)
parent483ad57efcd6475776f580c3af5b60e6deeaf781 (diff)
downloadninja-f1d8401aeb84e0eb0680caf72878dae26fd78a37.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into cut-copy-paste
Diffstat (limited to 'js/lib/math')
-rwxr-xr-xjs/lib/math/matrix.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/lib/math/matrix.js b/js/lib/math/matrix.js
index 77a0966d..3a5a8215 100755
--- a/js/lib/math/matrix.js
+++ b/js/lib/math/matrix.js
@@ -67,6 +67,15 @@ Matrix.Rotation = function(angle, axis) {
67 return mat; 67 return mat;
68}; 68};
69 69
70Matrix.Scale = function( scaleVec ) {
71 var mat = Matrix.I(4);
72 mat[ 0] = scaleVec[0];
73 mat[ 5] = scaleVec[1];
74 mat[10] = scaleVec[2];
75
76 return mat;
77};
78
70Matrix.flatten = function (mat) { 79Matrix.flatten = function (mat) {
71 var result = []; 80 var result = [];
72 if (this.elements.length == 0) { 81 if (this.elements.length == 0) {