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

Optimization

This commit is contained in:
2017-01-07 22:20:04 +01:00
parent 3e340ab941
commit 1586a5e912
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@
static qreal zoom2resolution(int zoom, qreal y)
{
return (WGS84_RADIUS * 2 * M_PI / Tile::size()
* cos(2 * atan(exp(deg2rad(y))) - M_PI/2)) / pow(2.0, zoom);
* cos(2 * atan(exp(deg2rad(y))) - M_PI/2)) / (qreal)(1<<zoom);
}
ScaleItem::ScaleItem(QGraphicsItem *parent) : QGraphicsItem(parent)