mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-01 08:32:10 +00:00
[formulas] Fix a bug in thomas inverse formula
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user