diff options
Diffstat (limited to 'js/helper-classes/3D/math-utils.js')
-rwxr-xr-x | js/helper-classes/3D/math-utils.js | 3 |
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 8a9be4b5..d793960c 100755 --- a/js/helper-classes/3D/math-utils.js +++ b/js/helper-classes/3D/math-utils.js | |||
@@ -839,7 +839,8 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, { | |||
839 | { | 839 | { |
840 | //var t = vec1.modulus() / vec0.modulus(); | 840 | //var t = vec1.modulus() / vec0.modulus(); |
841 | var t = VecUtils.vecMag(2, vec1)/VecUtils.vecMag(2, vec0); | 841 | var t = VecUtils.vecMag(2, vec1)/VecUtils.vecMag(2, vec0); |
842 | if ((this.fpSign(t) >= 0) && (this.fpCmp(t,1.0) <= 0)) | 842 | var dot = VecUtils.vecDot(2, vec0, vec1); |
843 | if ((this.fpSign(dot) >= 0) && (this.fpSign(t) >= 0) && (this.fpCmp(t,1.0) <= 0)) | ||
843 | return this.ON; | 844 | return this.ON; |
844 | else | 845 | else |
845 | return this.OUTSIDE; | 846 | return this.OUTSIDE; |