Skip to content

Commit

Permalink
Fixed approximation of arcs with theta>PI: atan2 was returning negati…
Browse files Browse the repository at this point in the history
…ve value, so I added 2*PI to make it in the range [0,2*PI)
  • Loading branch information
denizdiktas committed May 30, 2023
1 parent 910e043 commit 01e6057
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2984,6 +2984,8 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ {
auto ltx = CGAL::scalar_product(axisX, vt);
auto lty = CGAL::scalar_product(axisY, vt);
theta = std::atan2(lty, ltx);
if (theta < 0)
theta += 2.0 * CGAL_PI;
}

// compute the number of divisions given the error
Expand Down

0 comments on commit 01e6057

Please sign in to comment.