It appears as though there was an optimization to skip testing segments if
one of their endpoints (and only the A point) was inside. Unclear the reason
for this, but I'm going to assume that it was intended to optimize the case
where both points are inside (like the point case above it).
This fixes some DXFs imports where unforunately CAD tools like SolidWorks
randomly decide to mirror circle definitions across the "z" axis (resulting in x or y axis flips in 2d)
Most likely live projection from 3D to 2D drawings introduces this.
However this is DXF specification to describe it so obtusely with vectors for a 2d drawing.
1) Tests can't expect accuracies around 1 to work. PCBNew defaults
to 5000.
2) Tests shouldn't artifically expand tolerance just to match the
results.
3) Tests should guarantee that end point is on arc, not just close
to it.
4) Standard polygonization of a circle is inside so splitting the
error needs to increase radius, not decrease.
5) Special-case first and last points so that they're exact.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
This only tests the InterceptsPositiveX() and InterceptsNegativeX() used
for finding the midpoint of an arc.
Tidy up some of the trigo.h header Doxygen comments.