diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-07-02 10:21:15 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-07-02 10:48:01 -0700 |
commit | 9361cbfd5fc92538cfd5d7ef8bdaf83394861f9d (patch) | |
tree | b038c6cc990ae8c7a0082d7ba25d570a3cb58407 /src | |
parent | f5f19d0eb0deefd64d2107eb081e4035ad1a747c (diff) | |
download | qtlocation-mapboxgl-9361cbfd5fc92538cfd5d7ef8bdaf83394861f9d.tar.gz |
Fixed round-tripping between pixelForLatLng() / latLngForPixel()
Followup to cfa2eaf5c21858483cd12ee0768b43315ef29e95 for #1406.
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/map/transform_state.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/map/transform_state.cpp b/src/mbgl/map/transform_state.cpp index 3c4acc7e06..6a0c2a0d6a 100644 --- a/src/mbgl/map/transform_state.cpp +++ b/src/mbgl/map/transform_state.cpp @@ -218,8 +218,8 @@ const LatLng TransformState::latLngForPixel(const vec2<double> pixel) const { LatLng ll = getLatLng(); double zoom = getZoom(); - const double centerX = width / 2; - const double centerY = height / 2; + const double centerX = static_cast<double>(width) / 2.0; + const double centerY = static_cast<double>(height) / 2.0; const double m = Projection::getMetersPerPixelAtLatitude(0, zoom); |