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

A much better area Z-level algorithm

O(n^2) -> O(1)
This commit is contained in:
2022-01-27 00:26:28 +01:00
parent 1f0bd76f67
commit 0b3e54abf2
2 changed files with 3 additions and 21 deletions

View File

@ -30,6 +30,7 @@ public:
return (left() > right()) ? 360.0 - res : res;
}
double height() const {return (top() - bottom());}
double area() const {return qAbs(width()) * qAbs(height());}
double top() const {return _tl.lat();}
double bottom() const {return _br.lat();}