-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: ccw() floating point representation error.
Due to the way floating point numbers are represented, there is only 15-17 significant decimal digits of precision, so in some cases ccw would evaluate 3 points as not collinear, when they should be. This is fixed by rounding the area calculation to a fixed tolerance. I have set this to 13. In the future may allow users to set this through the API. Resolves: #19 See also: #20
- Loading branch information
Showing
2 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters