1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 03:29:16 +02:00

A more robust RectC to RectD algorithm

This commit is contained in:
2020-12-12 10:19:48 +01:00
parent 22fb6071f7
commit 4cef089c81
3 changed files with 36 additions and 26 deletions

View File

@ -24,6 +24,13 @@ public:
{return Coordinates((_tl.lon() + _br.lon()) / 2.0,
(_tl.lat() + _br.lat()) / 2.0);}
double width() const
{
double res = right() - left();
return (left() > right()) ? 360.0 - res : res;
}
double height() const {return (top() - bottom());}
double top() const {return _tl.lat();}
double bottom() const {return _br.lat();}
double left() const {return _tl.lon();}