diff options
author | Valerio Virgillito | 2012-03-13 11:15:34 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-03-13 11:15:34 -0700 |
commit | f6b958360d82854bdaf51848e7fd715d1f633179 (patch) | |
tree | 80f6c08bb730089bdd3f26310df8d2363f9ba863 /js/helper-classes/3D/math-utils.js | |
parent | c24f58c10231c30d3a8a4c9fb9a4f395dd746180 (diff) | |
parent | 4d7b86f55c504ee4e8c2460cf6b60cb9a2cf18f0 (diff) | |
download | ninja-f6b958360d82854bdaf51848e7fd715d1f633179.tar.gz |
Merge pull request #105 from joseeight/FileIO-Build-Candidate
File I/O adding webGL/canvas data functionality
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 | } |