[all] Make LatLng coordinates read-only

This commit is contained in:
John Firebaugh
2017-04-04 07:35:26 -07:00
parent a261f7ff53
commit 16a2839e23
21 changed files with 232 additions and 229 deletions

View File

@@ -325,10 +325,10 @@ void TransformState::setLatLngZoom(const LatLng &latLng, double zoom) {
Cc = newWorldSize / util::M2PI;
const double m = 1 - 1e-15;
const double f = util::clamp(std::sin(util::DEG2RAD * latLng.latitude), -m, m);
const double f = util::clamp(std::sin(util::DEG2RAD * latLng.latitude()), -m, m);
ScreenCoordinate point = {
-latLng.longitude * Bc,
-latLng.longitude() * Bc,
0.5 * Cc * std::log((1 + f) / (1 - f)),
};
setScalePoint(newScale, point);