[
https://issues.apache.org/jira/browse/GEOMETRY-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17480557#comment-17480557
]
Matt Juntunen commented on GEOMETRY-143:
----------------------------------------
I've created a PR for this: https://github.com/apache/commons-geometry/pull/192
The main change is to define and document a set of rules for how to classify
points in {{CutAngle}} when the cut angle, the test point, or both lie very
close to zero. I also added a method in {{Point1S}} named {{eqZero}} for
checking if a point is equivalent to zero. This is functionally the same as the
calling the existing {{eq}} method with {{Point1S.ZERO}} but I realized that we
did not need to perform any floating point operations (other than a comparison)
when checking against zero. I originally had this special case as a private
method in {{CutAngle}} but thought it would be useful to have in the public API.
[~rongoldman], this PR is a superset of the changes you had in your patch. I've
included your test case in the PR. Please review and let me know what you think.
> AngularInterval missclassify max boundary at 2pi- as outside
> -------------------------------------------------------------
>
> Key: GEOMETRY-143
> URL: https://issues.apache.org/jira/browse/GEOMETRY-143
> Project: Apache Commons Geometry
> Issue Type: Bug
> Components: Spherical 1D
> Reporter: Ron Goldman
> Priority: Major
> Attachments: patch
>
>
> When a AngularInterval has maxBoundary smaller than 2pi and equivalent to 2pi
> within precision, then the interval has false wrapZero but the upper boundary
> is classified by minBoundary as positive. as a result the point is classified
> as outside the interval instead of on the boundary.
> can be confirmed with the test:
> checkInterval(AngularInterval.of(6,Double.parseDouble("0x1.921fb54442c8ep2"),TEST_PRECISION),6,Double.parseDouble("0x1.921fb54442c8ep2"));
--
This message was sent by Atlassian Jira
(v8.20.1#820001)