diff options
author | hwc487 | 2012-03-06 11:41:09 -0800 |
---|---|---|
committer | hwc487 | 2012-03-06 11:41:09 -0800 |
commit | 182f05f2f7a8f43f1589c9b8c15bf00d6e983676 (patch) | |
tree | 9cb03f47344379ee501290ac87cadea91dcca443 /js/helper-classes/3D | |
parent | cf61d1545bffb25a807706fb56b2fe7f291adc2c (diff) | |
download | ninja-182f05f2f7a8f43f1589c9b8c15bf00d6e983676.tar.gz |
File IO
Diffstat (limited to 'js/helper-classes/3D')
-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 37044763..f084cf9f 100755 --- a/js/helper-classes/3D/math-utils.js +++ b/js/helper-classes/3D/math-utils.js | |||
@@ -709,7 +709,10 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, { | |||
709 | // the area of the polygon is the length of the normal | 709 | // the area of the polygon is the length of the normal |
710 | var area = VecUtils.vecMag(3, normal ); | 710 | var area = VecUtils.vecMag(3, normal ); |
711 | if (this.fpSign(area) != 0) | 711 | if (this.fpSign(area) != 0) |
712 | vec3.scale(normal, 1.0/area); | 712 | { |
713 | //vec3.scale(normal, 1.0/area); | ||
714 | normal = VecUtils.vecNormalize(3, normal, 1.0); | ||
715 | } | ||
713 | 716 | ||
714 | return normal; | 717 | return normal; |
715 | } | 718 | } |