summaryrefslogtreecommitdiff
path: root/src/location.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/location.hh')
-rw-r--r--src/location.hh23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/location.hh b/src/location.hh
new file mode 100644
index 0000000..ce4984e
--- /dev/null
+++ b/src/location.hh
@@ -0,0 +1,23 @@
+#ifndef LOCATION_HH
+#define LOCATION_HH
+
+#include <limits>
+#include <math.h>
+
+struct Location {
+ double lat;
+ double lng;
+
+ Location(double lat, double lng)
+ : lat(lat), lng(lng) {}
+
+ Location()
+ : lat(std::numeric_limits<double>::quiet_NaN()),
+ lng(std::numeric_limits<double>::quiet_NaN()) {}
+
+ bool empty() const {
+ return std::isnan(lat) || std::isnan(lng);
+ }
+};
+
+#endif // LOCATION_HH