Helps to create nice round numbers on axes and legends among other purposes. Derived from
C code
in Graphics Gems I article.