- Status Assigned
- Percent Complete
- Task Type Refactoring
- Category ECMAScript
-
Assigned To
andrew - Operating System All
- Severity Low
- Priority Very Low
- Reported Version 3.32.9
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#2734 - Concerning: Commit 2b1838b
RCircle.getVectorTo was modded to avoid the sqrt() in getMagnitude() and used v.getSquaredMagnitude().
Then comparing that with the square of the default tolerance (1e-18).
Part of Commit d233495
In RCircle::getDistanceTo
getDistanceTo2D is based on getMagnitude2D().
This should be compared with RS.PointTolerance (1e-9), not squared (1e-18).
! ! !
Only true in an arbitrary (unlimited) precision.
The method using the magnitude or the squared magnitude cannot be compared in floating point.
The squared magnitude will hardly ever have a meaningful 18th digit after the comma.
As it is the subtraction of the vector components with no more than 17 significant digits.
A method missing here is RVector::getSquaredMagnitude2D() avoiding + 0.0*0.0 for dz²
Here you use a circular tolerance area in 2D: Less than 1e-9 away in any 2D direction.
Or a spherical tolerance in 3D.
Positions are typically compared using an axis aligned square shape as tolerance range in 2D (RVector::equalsFuzzy2D) or a cubic box in 3D (RVector::equalsFuzzy):
Less than 1e-9 to 1.414214e-9 away in any 2D direction
Or less than 1e-9 to 1.732051e-9 away in 3D.
40 to 70% more tolerant depending 2 or 3D and the direction.
Regards,
CVH
PS:
I can start a comment on GitHub like before but that is no longer accepting inputs.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task