diff --git a/src/mbgl/map/transform_state.cpp b/src/mbgl/map/transform_state.cpp index 3c4acc7e0..6a0c2a0d6 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 pixel) const { LatLng ll = getLatLng(); double zoom = getZoom(); - const double centerX = width / 2; - const double centerY = height / 2; + const double centerX = static_cast(width) / 2.0; + const double centerY = static_cast(height) / 2.0; const double m = Projection::getMetersPerPixelAtLatitude(0, zoom);