Add comment for comparison with == in area formulas.

This commit is contained in:
Vissarion Fisikopoulos 2022-11-16 13:16:00 +02:00
parent b510c3ee74
commit a5d94e57ce

View File

@ -490,6 +490,7 @@ public:
CT lon12r = lon2r - lon1r;
math::normalize_longitude<radian, CT>(lon12r);
// Comparing with "==" works with all test cases here, but could potential create numerical issues
if (lon12r == pi || lon12r == -pi)
{
result.spherical_term = pi;
@ -590,6 +591,7 @@ public:
CT lon12 = lon2r - lon1r;
math::normalize_longitude<radian, CT>(lon12);
// Comparing with "==" works with all test cases here, but could potential create numerical issues
if (lon12 == pi || lon12 == -pi)
{
return true;