]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/formulas/vincenty_inverse.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / geometry / formulas / vincenty_inverse.hpp
index 032e16e2915f56e3060cdd87e08d1da43f550a8c..7bfcf69a9de8077d5171d1293ca6e9da41099b3e 100644 (file)
@@ -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;