aboutsummaryrefslogtreecommitdiff
path: root/js/lib/math
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-20 15:00:19 -0700
committerArmen Kesablyan2012-06-20 15:00:19 -0700
commit120e31dcf1e11eed11ee430d77c438e7b073e9f8 (patch)
tree8c07b1203de42f6efdeebfc8663072fffb4a567b /js/lib/math
parentc59eb371559a3061ce53223e249ca97daace5968 (diff)
parent52833c3d8a485944c42acc6ac0ae5139b3427da8 (diff)
downloadninja-120e31dcf1e11eed11ee430d77c438e7b073e9f8.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
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) {