diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-03-13 19:04:59 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-03-13 21:38:20 +0200 |
commit | fe7e208b4224101f3feeddf9808ecedd3b0f486f (patch) | |
tree | d5ef3133217c9cb96c2a917be3e9b3d3e1ba9e38 /include/mbgl/util/geo.hpp | |
parent | 8e30a4a0806e970e727c3563b8ed57dbaf9a0fa0 (diff) | |
download | qtlocation-mapboxgl-fe7e208b4224101f3feeddf9808ecedd3b0f486f.tar.gz |
[core] Implement LatLng::null()
Diffstat (limited to 'include/mbgl/util/geo.hpp')
-rw-r--r-- | include/mbgl/util/geo.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp index 94fbdc3d09..0b6ee17507 100644 --- a/include/mbgl/util/geo.hpp +++ b/include/mbgl/util/geo.hpp @@ -14,11 +14,15 @@ using ScreenCoordinate = vec2<double>; class LatLng { public: + struct null {}; + double latitude; double longitude; enum WrapMode : bool { Unwrapped, Wrapped }; + LatLng(null) : latitude(std::numeric_limits<double>::quiet_NaN()), longitude(latitude) {} + LatLng(double lat = 0, double lon = 0, WrapMode mode = Unwrapped) : latitude(lat), longitude(lon) { if (mode == Wrapped) wrap(); } |