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:
@ -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)
|
||||
|
||||
|
@ -20,10 +20,10 @@ RectC::RectC(const Coordinates ¢er, 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);
|
||||
|
Reference in New Issue
Block a user