reformat MercartorUtil.h

This commit is contained in:
Dennis Luxen 2014-05-07 11:42:13 +02:00
parent c2b7336817
commit bf5d83d228

View File

@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef MERCATORUTIL_H_ #ifndef MERCATOR_UTIL_H
#define MERCATORUTIL_H_ #define MERCATOR_UTIL_H
#include <cmath> #include <cmath>
@ -34,12 +34,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846
#endif #endif
inline double y2lat(double a) { inline double y2lat(const double a)
return 180./M_PI * (2. * atan(exp(a*M_PI/180.)) - M_PI/2.); {
return 180. / M_PI * (2. * atan(exp(a * M_PI / 180.)) - M_PI / 2.);
} }
inline double lat2y(double a) { inline double lat2y(const double a)
return 180./M_PI * log(tan(M_PI/4.+a*(M_PI/180.)/2.)); {
return 180. / M_PI * log(tan(M_PI / 4. + a * (M_PI / 180.) / 2.));
} }
#endif /* MERCATORUTIL_H_ */ #endif // MERCATOR_UTIL_H