diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-07-01 11:51:54 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-07-01 12:38:33 +0200 |
commit | 77e784675687d13439a8104c97c5bb0a9ccd8b01 (patch) | |
tree | ac5fe39c7c1d0db0923fec2b00b56291ef0f548e /src/mbgl/map/transform_state.cpp | |
parent | da863c6e52f656bd35c3d3346093a24d747d0bbd (diff) | |
download | qtlocation-mapboxgl-77e784675687d13439a8104c97c5bb0a9ccd8b01.tar.gz |
[core] code style cleanups
- puts function definitions in a namespace ... {} rather than using namespace ...;
- remove trailing whitespace
- add trailing newline
- protect SQL statements from being formatted by clang-format
Diffstat (limited to 'src/mbgl/map/transform_state.cpp')
-rw-r--r-- | src/mbgl/map/transform_state.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/map/transform_state.cpp b/src/mbgl/map/transform_state.cpp index 3d5a1a6798..86ffc254d8 100644 --- a/src/mbgl/map/transform_state.cpp +++ b/src/mbgl/map/transform_state.cpp @@ -336,10 +336,10 @@ void TransformState::setLatLngZoom(const LatLng &latLng, double zoom) { const double newWorldSize = newScale * util::tileSize; Bc = newWorldSize / util::DEGREES_MAX; Cc = newWorldSize / util::M2PI; - + const double m = 1 - 1e-15; const double f = util::clamp(std::sin(util::DEG2RAD * latLng.latitude), -m, m); - + ScreenCoordinate point = { -latLng.longitude * Bc, 0.5 * Cc * std::log((1 + f) / (1 - f)), @@ -351,7 +351,7 @@ void TransformState::setScalePoint(const double newScale, const ScreenCoordinate double constrainedScale = newScale; ScreenCoordinate constrainedPoint = point; constrain(constrainedScale, constrainedPoint.x, constrainedPoint.y); - + scale = constrainedScale; x = constrainedPoint.x; y = constrainedPoint.y; |