diff options
Diffstat (limited to 'src/positioning/qlocationutils_p.h')
-rw-r--r-- | src/positioning/qlocationutils_p.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/positioning/qlocationutils_p.h b/src/positioning/qlocationutils_p.h index c73a2c3b..f66179e1 100644 --- a/src/positioning/qlocationutils_p.h +++ b/src/positioning/qlocationutils_p.h @@ -97,11 +97,11 @@ public: return lng >= -180.0 && lng <= 180.0; } - inline static double clipLat(double lat) { - if (lat > 90.0) - lat = 90.0; - else if (lat < -90.0) - lat = -90.0; + inline static double clipLat(double lat, double clipValue = 90.0) { + if (lat > clipValue) + lat = clipValue; + else if (lat < -clipValue) + lat = -clipValue; return lat; } |