diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h index 230d2e6791a..05c49b53a1a 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h @@ -23,47 +23,38 @@ // // Author(s) : Geert-Jan Giezeman - #ifndef CGAL_INTERSECTIONS_2_CIRCLE_2_CIRCLE_2_H #define CGAL_INTERSECTIONS_2_CIRCLE_2_CIRCLE_2_H #include #include -namespace CGAL { - -namespace Intersections { +#include +namespace CGAL { +namespace Intersections { namespace internal { template -bool -do_intersect(const typename K::Circle_2 & circ1, - const typename K::Circle_2& circ2, - const K&) +bool do_intersect(const typename K::Circle_2 & circ1, + const typename K::Circle_2& circ2, + const K&) { - typedef typename K::FT FT; - FT sr1 = circ1.squared_radius(); - FT sr2 = circ2.squared_radius(); - FT squared_dist = squared_distance(circ1.center(), circ2.center()); - FT temp = sr1+sr2-squared_dist; - return !(FT(4)*sr1*sr2 < temp*temp); + typedef typename K::FT FT; + + FT sr1 = circ1.squared_radius(); + FT sr2 = circ2.squared_radius(); + FT squared_dist = squared_distance(circ1.center(), circ2.center()); + FT temp = sr1+sr2-squared_dist; + + return !(FT(4)*sr1*sr2 < temp*temp); } } // namespace internal } // namespace Intersections -template -inline -bool -do_intersect(const Circle_2 & circ1, - const Circle_2 & circ2) -{ - typedef typename K::Do_intersect_2 Do_intersect; - return Do_intersect()(circ1, circ2); -} +CGAL_DO_INTERSECT_FUNCTION_SELF(Circle_2, 2) - -} //namespace CGAL +} // namespace CGAL #endif