mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-06 09:50:27 -04:00
Introduce new TRIGONOMETRIC_EPSILON with higher precision than GEOMETRIC_EPSILON.
This commit is contained in:
parent
f5012a78e9
commit
9b883e5fb6
3 changed files with 10 additions and 4 deletions
src/util
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue