Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.3
-
None
-
None
Description
When splitting an arcs set using an arc very close to one of the boundaries (but not at the boundary), the algorithm confuses cases for which end - start = 2pi from cases for which end - start = epsilon.
The following test case shows such a failure:
@Test public void testSplitWithinEpsilon() { double epsilon = 1.0e-10; double a = 6.25; double b = a - 0.5 * epsilon; ArcsSet set = new ArcsSet(a - 1, a, epsilon); Arc arc = new Arc(b, b + FastMath.PI, epsilon); ArcsSet.Split split = set.split(arc); Assert.assertEquals(set.getSize(), split.getPlus().getSize(), epsilon); Assert.assertNull(split.getMinus()); }
The last assertion (split.getMinus() being null) fails, as with current code split.getMinus() covers the full circle from 0 to 2pi.