From 443b916301beb7672c2920ae643c05fb434a2005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 19 Nov 2017 23:01:17 +0100 Subject: [PATCH] Optimization --- src/lambertconic.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lambertconic.cpp b/src/lambertconic.cpp index 683f99ae..e3e88738 100644 --- a/src/lambertconic.cpp +++ b/src/lambertconic.cpp @@ -42,7 +42,7 @@ LambertConic::LambertConic(const Ellipsoid &ellipsoid, double standardParallel1, double standardParallel2, double latitudeOrigin, double longitudeOrigin, double scale, double falseEasting, double falseNorthing) : _e(ellipsoid) { - _cm = longitudeOrigin; + _cm = deg2rad(longitudeOrigin); _fe = falseEasting; _fn = falseNorthing; @@ -63,7 +63,7 @@ LambertConic::LambertConic(const Ellipsoid &ellipsoid, double standardParallel1, QPointF LambertConic::ll2xy(const Coordinates &c) const { - double dl = _n * (deg2rad(c.lon()) - deg2rad(_cm)); + double dl = _n * (deg2rad(c.lon()) - _cm); double R = _R0 * exp(_n * (_q0 - q(_e, deg2rad(c.lat())))); return QPointF(_fe + R * sin(dl), _fn + _R0 - R * cos(dl)); @@ -77,5 +77,5 @@ Coordinates LambertConic::xy2ll(const QPointF &p) const double R = sqrt(dx * dx + dy * dy); double q = _q0 - log(fabs(R / _R0)) / _n; - return Coordinates(rad2deg(deg2rad(_cm) + dl / _n), rad2deg(iq(_e, q))); + return Coordinates(rad2deg(_cm + dl / _n), rad2deg(iq(_e, q))); }