Introduce new TRIGONOMETRIC_EPSILON with higher precision than GEOMETRIC_EPSILON.

This commit is contained in:
Jürg Lehni 2015-10-01 20:44:27 -05:00
parent f5012a78e9
commit 9b883e5fb6
3 changed files with 10 additions and 4 deletions
src/util

View file

@ -94,6 +94,12 @@ var Numerical = new function() {
* trial and error.
*/
GEOMETRIC_EPSILON: 1e-7,
/**
* The epsilon to be used when performing "trigonometric" checks, such
* as examining cross products to check for collinearity. This value is
* somewhat arbitrary and was chosen by trial and error.
*/
TRIGONOMETRIC_EPSILON: 1e-8,
/**
* MACHINE_EPSILON for a double precision (Javascript Number) is
* 2.220446049250313e-16. (try this in the js console)