[core] #509 - Creating and using MIN_ZOOM and MAX_ZOOM constants

This commit is contained in:
Brad Leege
2016-02-03 18:57:22 -06:00
parent 511c01c6ca
commit 87bac32a33
3 changed files with 6 additions and 2 deletions

View File

@@ -162,7 +162,7 @@ double TransformState::getScale() const {
void TransformState::setMinZoom(const double minZoom) {
if (minZoom <= getMaxZoom()) {
min_scale = zoomScale(util::clamp(minZoom, 0.0, 25.5));
min_scale = zoomScale(util::clamp(minZoom, util::MIN_ZOOM, util::MAX_ZOOM));
}
}
@@ -177,7 +177,7 @@ double TransformState::getMinZoom() const {
void TransformState::setMaxZoom(const double maxZoom) {
if (maxZoom >= getMinZoom()) {
max_scale = zoomScale(util::clamp(maxZoom, 0.0, 25.5));
max_scale = zoomScale(util::clamp(maxZoom, util::MIN_ZOOM, util::MAX_ZOOM));
}
}