diff options
author | Jose Antonio Marquez | 2012-03-02 19:06:17 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-02 19:06:17 -0800 |
commit | 45052033e018ecc0cba582f84c0431d3bd4020fe (patch) | |
tree | 26d3dd1059d9fe427805d9ba6a2948b5557f0eea /js/helper-classes/3D/math-utils.js | |
parent | 940b9fc0bf71845bcae39de637e85697e5911eea (diff) | |
parent | 13f52cf0c74f53a919fa864f86669e8155f82961 (diff) | |
download | ninja-45052033e018ecc0cba582f84c0431d3bd4020fe.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO-Build-Candidate
Diffstat (limited to 'js/helper-classes/3D/math-utils.js')
-rwxr-xr-x | js/helper-classes/3D/math-utils.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/js/helper-classes/3D/math-utils.js b/js/helper-classes/3D/math-utils.js index 37044763..de63f880 100755 --- a/js/helper-classes/3D/math-utils.js +++ b/js/helper-classes/3D/math-utils.js | |||
@@ -538,6 +538,39 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, { | |||
538 | } | 538 | } |
539 | }, | 539 | }, |
540 | 540 | ||
541 | isIdentityMatrix: { | ||
542 | value: function( mat ) | ||
543 | { | ||
544 | if(!mat) | ||
545 | { | ||
546 | return false; | ||
547 | } | ||
548 | else | ||
549 | { | ||
550 | if(mat[0] !== 1) return false; | ||
551 | if(mat[1] !== 0) return false; | ||
552 | if(mat[2] !== 0) return false; | ||
553 | if(mat[3] !== 0) return false; | ||
554 | |||
555 | if(mat[4] !== 0) return false; | ||
556 | if(mat[5] !== 1) return false; | ||
557 | if(mat[6] !== 0) return false; | ||
558 | if(mat[7] !== 0) return false; | ||
559 | |||
560 | if(mat[8] !== 0) return false; | ||
561 | if(mat[9] !== 0) return false; | ||
562 | if(mat[10] !== 1) return false; | ||
563 | if(mat[11] !== 0) return false; | ||
564 | |||
565 | if(mat[12] !== 0) return false; | ||
566 | if(mat[13] !== 0) return false; | ||
567 | if(mat[14] !== 0) return false; | ||
568 | if(mat[15] !== 1) return false; | ||
569 | } | ||
570 | return true; | ||
571 | } | ||
572 | }, | ||
573 | |||
541 | rectsOverlap: | 574 | rectsOverlap: |
542 | { | 575 | { |
543 | value: function( pt, width, height, elt ) | 576 | value: function( pt, width, height, elt ) |