1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-27 00:44:24 +02:00

Some more error handling fixes.

This commit is contained in:
2016-10-29 10:40:30 +02:00
parent 78fb5c1547
commit 640829d89d
11 changed files with 45 additions and 25 deletions

View File

@ -19,7 +19,12 @@ public:
qreal lon() const {return _lon;}
qreal lat() const {return _lat;}
bool isValid() const;
bool isNull() const
{return (std::isnan(_lon) || std::isnan(_lat)) ? true : false;}
bool isValid() const
{return (_lon >= -180.0 && _lon <= 180.0 && _lat >= -90.0
&& _lat <= 90.0) ? true : false;}
qreal distanceTo(const Coordinates &c) const;
QPointF toMercator() const;