Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-11-15 21:41:32 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:28:03 +0300
commitfe1c07f091dc9dfb7f5adda8a6569d729c1baebc (patch)
treed0806347d730c28aeb5ba4819b93af91cccda801 /platform/location.hpp
parentc47199b2295a7969b4c49c24606474fae346a127 (diff)
Closed #347 - check for invalid rect and location
Diffstat (limited to 'platform/location.hpp')
-rw-r--r--platform/location.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/location.hpp b/platform/location.hpp
index 7342298854..5080acaeaf 100644
--- a/platform/location.hpp
+++ b/platform/location.hpp
@@ -52,4 +52,14 @@ namespace location
// int m_y;
// int m_z;
};
+
+ static inline bool IsLatValid(double lat)
+ {
+ return lat != 0. && lat < 90. && lat > -90.;
+ }
+ static inline bool IsLonValid(double lon)
+ {
+ return lon != 0. && lon < 180. && lon > -180.;
+ }
+
} // namespace location