Use EPSILON instead of TOLERANCE in Point#isColinear() and #isOrthogonal()

This commit is contained in:
Jürg Lehni 2015-01-02 23:48:34 +01:00
parent 538eac6dc7
commit 5f0e545ba7

View file

@ -702,7 +702,7 @@ var Point = Base.extend(/** @lends Point# */{
* @returns {Boolean} {@true it is colinear}
*/
isColinear: function(point) {
return Math.abs(this.cross(point)) < /*#=*/Numerical.TOLERANCE;
return Math.abs(this.cross(point)) < /*#=*/Numerical.EPSILON;
},
/**
@ -713,7 +713,7 @@ var Point = Base.extend(/** @lends Point# */{
* @returns {Boolean} {@true it is orthogonal}
*/
isOrthogonal: function(point) {
return Math.abs(this.dot(point)) < /*#=*/Numerical.TOLERANCE;
return Math.abs(this.dot(point)) < /*#=*/Numerical.EPSILON;
},
/**