[formulas] Fix a bug in thomas inverse formula

This commit is contained in:
Vissarion Fysikopoulos
2018-03-28 16:59:03 +03:00
parent df23bb19b8
commit ff6547bc7b

View File

@@ -1,7 +1,8 @@
// Boost.Geometry
// Copyright (c) 2015-2017 Oracle and/or its affiliates.
// Copyright (c) 2015-2018 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -177,7 +178,7 @@ public:
CT const pi = math::pi<CT>();
if (BOOST_GEOMETRY_CONDITION(EnableAzimuth))
if (BOOST_GEOMETRY_CONDITION(CalcFwdAzimuth))
{
CT alpha1 = v + u;
if (alpha1 > pi)
@@ -188,7 +189,7 @@ public:
result.azimuth = alpha1;
}
if (BOOST_GEOMETRY_CONDITION(EnableReverseAzimuth))
if (BOOST_GEOMETRY_CONDITION(CalcRevAzimuth))
{
CT alpha2 = pi - (v - u);
if (alpha2 > pi)