aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-xjs/helper-classes/3D/math-utils.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/helper-classes/3D/math-utils.js b/js/helper-classes/3D/math-utils.js
index 44e2499d..409d2750 100755
--- a/js/helper-classes/3D/math-utils.js
+++ b/js/helper-classes/3D/math-utils.js
@@ -815,7 +815,8 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, {
815 { 815 {
816 //var t = vec1.modulus() / vec0.modulus(); 816 //var t = vec1.modulus() / vec0.modulus();
817 var t = VecUtils.vecMag(2, vec1)/VecUtils.vecMag(2, vec0); 817 var t = VecUtils.vecMag(2, vec1)/VecUtils.vecMag(2, vec0);
818 if ((this.fpSign(t) >= 0) && (this.fpCmp(t,1.0) <= 0)) 818 var dot = VecUtils.vecDot(2, vec0, vec1);
819 if ((this.fpSign(dot) >= 0) && (this.fpSign(t) >= 0) && (this.fpCmp(t,1.0) <= 0))
819 return this.ON; 820 return this.ON;
820 else 821 else
821 return this.OUTSIDE; 822 return this.OUTSIDE;