Document QWebMercator a bit and clean up its qmath.h usage
Use qDegreesToRadians() and qRadiansToDegrees() in preference to
multiplying by pi/180 or 180/pi and restructure the arithmetic using
them to be a bit easier to follow. This hopefully also makes clearer
where M_PI is used for other reasons (to scale a logarithm, or the
parameter to exp() on the way back) that it's not about converting
degrees to radians. It also makes it easier to see that the two
conversions are mutually inverse.
Changed variable names to make clear where we're converting from one
coordinate system to the other, rather than reusing longitude's name
for x and latitude's for y. Simplified the inverse's logic for mapping
x back into the unit interval by first modifying the local x variable
if negative to make it positive (effectively adding an inteter to it).
Explain what the transformation is doing and how it departs from
orthodoxy and selects its choice of parameterisation in Mercator
coordinates. Clarify the existing comment about the clipping of the
y-coordinate.
Pick-to: 6.11
Change-Id: I601fe2e20015ebeff98da5b8c6fde606f14cafde
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>