1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 11:39:16 +02:00

PI defines cleanup

This commit is contained in:
2018-05-15 21:51:56 +02:00
parent a762445bce
commit 025a403c73
11 changed files with 34 additions and 49 deletions

View File

@ -4,9 +4,6 @@
#include <cmath>
#include <QDebug>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif // M_PI
#define deg2rad(d) (((d)*M_PI)/180.0)
#define rad2deg(d) (((d)*180.0)/M_PI)

View File

@ -20,10 +20,10 @@ RectC::RectC(const Coordinates &center, double radius)
double deltaLon = asin(sin(radDist) / cos(radlat));
minLon = radLon - deltaLon;
if (minLon < MIN_LON)
minLon += 2.0 * M_PI;
minLon += M_2_PI;
maxLon = radLon + deltaLon;
if (maxLon > MAX_LON)
maxLon -= 2.0 * M_PI;
maxLon -= M_2_PI;
} else {
// a pole is within the distance
minLat = qMax(minLat, MIN_LAT);