[
https://issues.apache.org/jira/browse/GEOMETRY-86?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Baljit Singh updated GEOMETRY-86:
---------------------------------
Description:
The antipodal calculation is invalid.
{code:java}
@Test
public void testAntipodal() {
Point2S point = Point2S.of(0.0, 0.0).antipodal();
Point2S copy = Point2S.from(point.getVector());
System.out.println(point);
System.out.println(copy);
}
{code}
This prints:
(0.0, 3.141592653589793)
(3.141592653589793, 3.141592653589793)
SphericalTestUtils.assertPointsEq does not detect the error because the
point.getVector() and copy.getVector() are equal, and therefore the distance
between these points is equal.
was:
The antipodal calculation is invalid.
{code:java}
@Test
public void testAntipodal() {
Point2S point = Point2S.of(0.0, 0.0).antipodal();
Point2S copy = Point2S.from(point.getVector());
System.out.println(point);
System.out.println(copy);
}
{code}
This prints:
(0.0, 3.141592653589793)
(3.141592653589793, 3.141592653589793)
SphericalTestUtils.assertPointsEq does not detect the error because the
point.getVector() and copy.getVector(0 are equal, and therefore the distance
between these points is equal.
> Point2S.antipodal() is incorrect.
> ---------------------------------
>
> Key: GEOMETRY-86
> URL: https://issues.apache.org/jira/browse/GEOMETRY-86
> Project: Apache Commons Geometry
> Issue Type: Bug
> Reporter: Baljit Singh
> Priority: Major
>
> The antipodal calculation is invalid.
> {code:java}
> @Test
> public void testAntipodal() {
> Point2S point = Point2S.of(0.0, 0.0).antipodal();
> Point2S copy = Point2S.from(point.getVector());
> System.out.println(point);
> System.out.println(copy);
> }
> {code}
> This prints:
> (0.0, 3.141592653589793)
> (3.141592653589793, 3.141592653589793)
> SphericalTestUtils.assertPointsEq does not detect the error because the
> point.getVector() and copy.getVector() are equal, and therefore the distance
> between these points is equal.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)