summaryrefslogtreecommitdiff
path: root/boost/geometry/formulas/vincenty_inverse.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/formulas/vincenty_inverse.hpp')
-rw-r--r--boost/geometry/formulas/vincenty_inverse.hpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/boost/geometry/formulas/vincenty_inverse.hpp b/boost/geometry/formulas/vincenty_inverse.hpp
index 032e16e291..7bfcf69a9d 100644
--- a/boost/geometry/formulas/vincenty_inverse.hpp
+++ b/boost/geometry/formulas/vincenty_inverse.hpp
@@ -1,6 +1,7 @@
// Boost.Geometry
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2018 Adam Wulkiewicz, Lodz, Poland.
// This file was modified by Oracle on 2014, 2016, 2017.
// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
@@ -18,7 +19,6 @@
#include <boost/math/constants/constants.hpp>
#include <boost/geometry/core/radius.hpp>
-#include <boost/geometry/core/srs.hpp>
#include <boost/geometry/util/condition.hpp>
#include <boost/geometry/util/math.hpp>
@@ -79,6 +79,7 @@ public:
return result;
}
+ CT const c0 = 0;
CT const c1 = 1;
CT const c2 = 2;
CT const c3 = 3;
@@ -145,7 +146,7 @@ public:
CT cos_sigma = sin_U1 * sin_U2 + cos_U1 * cos_U2 * cos_lambda; // (15)
sin_alpha = cos_U1 * cos_U2 * sin_lambda / sin_sigma; // (17)
cos2_alpha = c1 - math::sqr(sin_alpha);
- cos_2sigma_m = math::equals(cos2_alpha, 0) ? 0 : cos_sigma - c2 * sin_U1 * sin_U2 / cos2_alpha; // (18)
+ cos_2sigma_m = math::equals(cos2_alpha, c0) ? c0 : cos_sigma - c2 * sin_U1 * sin_U2 / cos2_alpha; // (18)
cos2_2sigma_m = math::sqr(cos_2sigma_m);
CT C = f/c16 * cos2_alpha * (c4 + f * (c4 - c3 * cos2_alpha)); // (10)
@@ -163,10 +164,6 @@ public:
{
// Oops getting hard here
// (again, problem is that ttmath cannot divide by doubles, which is OK)
- CT const c1 = 1;
- CT const c2 = 2;
- CT const c3 = 3;
- CT const c4 = 4;
CT const c6 = 6;
CT const c47 = 47;
CT const c74 = 74;