Optimize ArcCos.
I follow this advice by proposing the patch only now and on my own behalf, instead of, say, trying to persuade the original author and potentially shifting the responsibility to him in case the code is wrong.
ArcCos
branches are already covered by ArcTan2
branches, so ArcCos
can be an one-liner. I added a test (to a somewhat arbitrary place) that ensures it.
Edited by Rika