From fe1c07f091dc9dfb7f5adda8a6569d729c1baebc Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Tue, 15 Nov 2011 20:41:32 +0300 Subject: Closed #347 - check for invalid rect and location --- platform/location.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'platform/location.hpp') 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 -- cgit v1.2.3