normalizedZoom() == zoom level of the visual appearance

This commit is contained in:
Konstantin Käfer
2014-03-24 14:44:44 +01:00
parent 31912731d4
commit 5c613b5455
4 changed files with 13 additions and 8 deletions

View File

@@ -256,6 +256,10 @@ float Transform::getZoom() const {
return log(scale) / M_LN2;
}
float Transform::getNormalizedZoom() const {
return log(scale * util::tileSize / 256.0f) / M_LN2;
}
int32_t Transform::getIntegerZoom() const {
return floor(log(scale) / M_LN2);
}