diff options
author | Nivesh Rajbhandari | 2012-03-13 13:05:33 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-13 13:05:33 -0700 |
commit | 92fc2e3c4bca2edb04102431b4959aafe022f329 (patch) | |
tree | d48c090f71ed2cd6bd6ce38ff68c36ab69299985 /js/helper-classes/3D/math-utils.js | |
parent | efb92cf52680d31f05fed3757e74862592cc2d4c (diff) | |
parent | f56b8cf4d3316d250c0f0045fb78f0dbd5c56e94 (diff) | |
download | ninja-92fc2e3c4bca2edb04102431b4959aafe022f329.tar.gz |
Merge branch 'refs/heads/ninja-internal' into ToolFixes
Diffstat (limited to 'js/helper-classes/3D/math-utils.js')
-rwxr-xr-x | js/helper-classes/3D/math-utils.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/js/helper-classes/3D/math-utils.js b/js/helper-classes/3D/math-utils.js index 562a6e73..2f0283a9 100755 --- a/js/helper-classes/3D/math-utils.js +++ b/js/helper-classes/3D/math-utils.js | |||
@@ -729,7 +729,10 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, { | |||
729 | // the area of the polygon is the length of the normal | 729 | // the area of the polygon is the length of the normal |
730 | var area = VecUtils.vecMag(3, normal ); | 730 | var area = VecUtils.vecMag(3, normal ); |
731 | if (this.fpSign(area) != 0) | 731 | if (this.fpSign(area) != 0) |
732 | vec3.scale(normal, 1.0/area); | 732 | { |
733 | //vec3.scale(normal, 1.0/area); | ||
734 | normal = VecUtils.vecNormalize(3, normal, 1.0); | ||
735 | } | ||
733 | 736 | ||
734 | return normal; | 737 | return normal; |
735 | } | 738 | } |