mirrorAngle(HALF_PI) should be -HALFPI rather than HALF_PI
Change new mirrorAngle to mirrorAngleOrigin, improved javadocs.

The old mirrorAngle mirrors around the "y-axis" (PI/2 or -PI/2 as appropriate)
which is necessary for other code (particularly angularDifference) to work
correctly. The new mirrorAngleOrigin mirrors around the "x-axis" (zero).
Save an extra call to mirrorAngle when d == md.
We need Scala for test classes.