diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2017-01-12 18:02:45 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-02-27 17:04:47 +0000 |
commit | 11e6a62957433843816b41ad11fada7ca8eab85c (patch) | |
tree | 22baca117d83825ef1596cb7abb9874309fda2c0 /src/location/declarativemaps/qdeclarativecirclemapitem.cpp | |
parent | 7692448da626e803a05344e6ef31ecac9cc5b460 (diff) | |
download | qtlocation-11e6a62957433843816b41ad11fada7ca8eab85c.tar.gz |
Use qRadiansToDegrees() and qDegreesToRadians() more widely
They document intent more clearly (and replace *two* local hand-rolled
versions of each). Also kill an extraneous #include of <math.h>; and
switch to qmath.h as source for M_PI, replacing the M_PID value (and
friends) previously provided by (thankfully private)
qlocationutils_p.h (at more precision than even long double would
retain - qmath.h's M_PI is entirely sufficient even for long double,
as is the Linux <math.h> one).
Task-number: QTBUG-58083
Change-Id: I6fa4abd3c8ed9c826998f2cdc2aefc51681c19c1
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativecirclemapitem.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativecirclemapitem.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/location/declarativemaps/qdeclarativecirclemapitem.cpp b/src/location/declarativemaps/qdeclarativecirclemapitem.cpp index 89b139c8..a4eee272 100644 --- a/src/location/declarativemaps/qdeclarativecirclemapitem.cpp +++ b/src/location/declarativemaps/qdeclarativecirclemapitem.cpp @@ -40,7 +40,7 @@ #include "qwebmercator_p.h" #include <QtLocation/private/qgeomap_p.h> -#include <cmath> +#include <qmath.h> #include <algorithm> #include <QtCore/QScopedValueRollback> @@ -128,11 +128,6 @@ QT_BEGIN_NAMESPACE \image api-mapcircle.png */ -#ifdef M_PI -#undef M_PI -#endif -#define M_PI 3.14159265358979323846264338327950288 - static const int CircleSamples = 128; struct Vertex |