mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 05:24:02 +00:00
Merge pull request #1365 from awulkiew/fix/warning
[formulas] Fix warning (variable hiding member) in sjoberg_intersection
This commit is contained in:
commit
fe817e6247
@ -1,6 +1,6 @@
|
|||||||
// Boost.Geometry
|
// Boost.Geometry
|
||||||
|
|
||||||
// Copyright (c) 2023 Adam Wulkiewicz, Lodz, Poland.
|
// Copyright (c) 2023-2025 Adam Wulkiewicz, Lodz, Poland.
|
||||||
|
|
||||||
// Copyright (c) 2016-2019 Oracle and/or its affiliates.
|
// Copyright (c) 2016-2019 Oracle and/or its affiliates.
|
||||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||||
@ -566,7 +566,6 @@ public:
|
|||||||
{
|
{
|
||||||
CT const c0 = 0;
|
CT const c0 = 0;
|
||||||
CT const dLj = d_lambda(c0);
|
CT const dLj = d_lambda(c0);
|
||||||
CT const asin_tj_t0j = asin(Cj * tan_betaj / sqrt_1_Cj_sqr);
|
|
||||||
return lonj - asin_tj_t0j + dLj;
|
return lonj - asin_tj_t0j + dLj;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -676,8 +675,8 @@ public:
|
|||||||
CT const f = formula::flattening<CT>(spheroid);
|
CT const f = formula::flattening<CT>(spheroid);
|
||||||
CT const one_minus_f = c1 - f;
|
CT const one_minus_f = c1 - f;
|
||||||
|
|
||||||
geodesic_type geod1(lon_a1, lat_a1, alpha_a1, f);
|
geodesic_type const geod1(lon_a1, lat_a1, alpha_a1, f);
|
||||||
geodesic_type geod2(lon_b1, lat_b1, alpha_b1, f);
|
geodesic_type const geod2(lon_b1, lat_b1, alpha_b1, f);
|
||||||
|
|
||||||
// Cj = 1 if on equator <=> sqrt_1_Cj_sqr = 0
|
// Cj = 1 if on equator <=> sqrt_1_Cj_sqr = 0
|
||||||
// Cj = 0 if vertical <=> sqrt_1_Cj_sqr = 1
|
// Cj = 0 if vertical <=> sqrt_1_Cj_sqr = 1
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
// Boost.Geometry
|
// Boost.Geometry
|
||||||
// Unit Test
|
// Unit Test
|
||||||
|
|
||||||
|
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
|
||||||
|
|
||||||
// Copyright (c) 2016-2019 Oracle and/or its affiliates.
|
// Copyright (c) 2016-2019 Oracle and/or its affiliates.
|
||||||
|
|
||||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||||
@ -185,6 +187,19 @@ void test_bugs()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void test_special_cases()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double lon, lat;
|
||||||
|
bg::formula::sjoberg_intersection<double, bg::formula::andoyer_inverse, 1>
|
||||||
|
::apply(-0.01, 0.0, 0.01, 0.0,
|
||||||
|
0.0, -0.01, 0.0, 0.01,
|
||||||
|
lon, lat, bg::srs::spheroid<double>());
|
||||||
|
check_one("geodesic on equator", lon, 0.0);
|
||||||
|
check_one("geodesic on equator", lat, 0.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int test_main(int, char*[])
|
int test_main(int, char*[])
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < expected_size; ++i)
|
for (size_t i = 0; i < expected_size; ++i)
|
||||||
@ -193,6 +208,7 @@ int test_main(int, char*[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
test_bugs();
|
test_bugs();
|
||||||
|
test_special_cases();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user