-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interp: fix GE/LE operators to better handle double-precision comparison
This commit does four things: 1. Changes the LE/GE operators to better handle double-precision floating-point comparisons. When comparing two values as equal (or not equal) the EQ and NE operators considered the floating-point precision "issue" by comparing the difference between the two values to TOLERANCE_EQUAL, GE and LE did not. 2. Tidy the difference by using fabs() 3. Modify the TOLERANCE_EQUAL threshold to 1e-6. Previously this was set to .0001 which is very close to a reasonable difference between two gcode coordinate values. 4. Update the documentation to reflect these change.
- Loading branch information
1 parent
f15826f
commit 014777a
Showing
3 changed files
with
12 additions
and
13 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
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