diff options
author | Aaron McCarthy <aaron.mccarthy@jollamobile.com> | 2015-06-19 15:08:41 +1000 |
---|---|---|
committer | Aaron McCarthy <mccarthy.aaron@gmail.com> | 2015-06-26 06:46:31 +0000 |
commit | 95c58d6eb5a5557ca2f2be3d54f267c648f62731 (patch) | |
tree | 9fd4df75c26cbd25d5e5baca17142d482da9d934 /src | |
parent | 55483227f811898ef97ce408145a028231afbbf2 (diff) | |
download | qtlocation-95c58d6eb5a5557ca2f2be3d54f267c648f62731.tar.gz |
Make use of qBound
Change-Id: Ia6859fa30118f29d6074d4ffed9e22023f75cc3b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/positioning/qgeoprojection.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/positioning/qgeoprojection.cpp b/src/positioning/qgeoprojection.cpp index 0d3543e4..a2e087b0 100644 --- a/src/positioning/qgeoprojection.cpp +++ b/src/positioning/qgeoprojection.cpp @@ -51,8 +51,7 @@ QDoubleVector2D QGeoProjection::coordToMercator(const QGeoCoordinate &coord) double lat = coord.latitude(); lat = 0.5 - (std::log(std::tan((pi / 4.0) + (pi / 2.0) * lat / 180.0)) / pi) / 2.0; - lat = qMax(0.0, lat); - lat = qMin(1.0, lat); + lat = qBound(0.0, lat, 1.0); return QDoubleVector2D(lon, lat); } |