diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-04-11 17:07:25 +0300 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-14 12:33:13 -0700 |
commit | 2f4d162debd7e4accfc0b20360058304dce40801 (patch) | |
tree | 276894e2ccfa67874dbe6ecf263330d6b35007ad /platform/darwin/src/MGLMapCamera.mm | |
parent | 8877452ec36d01a753221998f31b67700e595d54 (diff) | |
download | qtlocation-mapboxgl-2f4d162debd7e4accfc0b20360058304dce40801.tar.gz |
[core] Tighten geo.hpp ctors
Diffstat (limited to 'platform/darwin/src/MGLMapCamera.mm')
-rw-r--r-- | platform/darwin/src/MGLMapCamera.mm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLMapCamera.mm b/platform/darwin/src/MGLMapCamera.mm index 49c7e70900..1611dbf4a3 100644 --- a/platform/darwin/src/MGLMapCamera.mm +++ b/platform/darwin/src/MGLMapCamera.mm @@ -32,11 +32,11 @@ BOOL MGLEqualFloatWithAccuracy(CGFloat left, CGFloat right, CGFloat accuracy) mbgl::ProjectedMeters centerMeters = mbgl::Projection::projectedMetersForLatLng(centerLatLng); mbgl::ProjectedMeters eyeMeters = mbgl::Projection::projectedMetersForLatLng(eyeLatLng); - heading = std::atan((centerMeters.northing - eyeMeters.northing) / - (centerMeters.easting - eyeMeters.easting)); + heading = std::atan((centerMeters.northing() - eyeMeters.northing()) / + (centerMeters.easting() - eyeMeters.easting())); - double groundDistance = std::hypot(centerMeters.northing - eyeMeters.northing, - centerMeters.easting - eyeMeters.easting); + double groundDistance = std::hypot(centerMeters.northing() - eyeMeters.northing(), + centerMeters.easting() - eyeMeters.easting()); pitch = std::atan(eyeAltitude / groundDistance); } |