mirror of
https://github.com/boostorg/geometry.git
synced 2026-01-30 20:02:11 +00:00
[util][formulas] Rename normalize_angle function to normalize_azimuth
For normalizing longitudes, the normalize_longitude function is used instead.
This commit is contained in:
@@ -80,7 +80,7 @@ public:
|
||||
CT const lat1 = la1;
|
||||
|
||||
Azi azi12 = azimuth12;
|
||||
math::normalize_angle<degree, Azi>(azi12);
|
||||
math::normalize_azimuth<degree, Azi>(azi12);
|
||||
|
||||
Dist const dist_c0 = 0;
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
|
||||
math::normalize_values<CT>(sin_beta1, cos_beta1);
|
||||
|
||||
cos_beta1 = std::max(math::sqrt(c0), cos_beta1);
|
||||
cos_beta1 = (std::max)(c0, cos_beta1);
|
||||
|
||||
// Obtain alpha 0 by solving the spherical triangle.
|
||||
CT const sin_alpha0 = sin_alpha1 * cos_beta1;
|
||||
@@ -216,8 +216,8 @@ public:
|
||||
|
||||
// Add the longitude at first point to the longitudinal
|
||||
// difference and normalize the result.
|
||||
math::normalize_angle<degree, CT>(lon1);
|
||||
math::normalize_angle<degree, CT>(lon12);
|
||||
math::normalize_longitude<degree, CT>(lon1);
|
||||
math::normalize_longitude<degree, CT>(lon12);
|
||||
|
||||
result.lon2 = lon1 + lon12;
|
||||
}
|
||||
|
||||
@@ -365,15 +365,15 @@ inline void normalize_longitude(CoordinateType& longitude)
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Short utility to normalize an angle on a spheroid
|
||||
normalized in range (-180, 180].
|
||||
\brief Short utility to normalize the azimuth on a spheroid
|
||||
in the range (-180, 180].
|
||||
\tparam Units The units of the coordindate system in the spheroid
|
||||
\tparam CoordinateType The type of the coordinates
|
||||
\param angle Angle
|
||||
\ingroup utility
|
||||
*/
|
||||
template <typename Units, typename CoordinateType>
|
||||
inline void normalize_angle(CoordinateType& angle)
|
||||
inline void normalize_azimuth(CoordinateType& angle)
|
||||
{
|
||||
normalize_longitude<Units, CoordinateType>(angle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user