From 2fa9033fc7efc7d10b222bbf31bd7eb63f2e7615 Mon Sep 17 00:00:00 2001 From: Monique Teillaud Date: Wed, 13 Aug 2008 09:39:54 +0000 Subject: [PATCH] comment added to help the reader --- .../examples/Circular_kernel_2/intersecting_arcs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Circular_kernel_2/examples/Circular_kernel_2/intersecting_arcs.cpp b/Circular_kernel_2/examples/Circular_kernel_2/intersecting_arcs.cpp index 86ad4fffc67..b77e74a1fc2 100644 --- a/Circular_kernel_2/examples/Circular_kernel_2/intersecting_arcs.cpp +++ b/Circular_kernel_2/examples/Circular_kernel_2/intersecting_arcs.cpp @@ -18,12 +18,16 @@ double prob_2() { Point_2 p1, p2, p3, p4, p5, p6; p1 = *g++; p2 = *g++; p3 = *g++; p4 = *g++; p5 = *g++; p6 = *g++; + // the pi's are points inherited from the Cartesian kernel Point_2, so, + // the orientation prdicate can be called on them if(CGAL::orientation(p1, p2, p3) != CGAL::COUNTERCLOCKWISE) std::swap(p1, p3); T o1 = T(p1, p2, p3); if(CGAL::orientation(p4, p5, p6) != CGAL::COUNTERCLOCKWISE) std::swap(p4, p6); T o2 = T(p4, p5, p6); + std::vector< CGAL::Object > res; CGAL::intersection(o1, o2, std::back_inserter(res)); + prob += (res.size() != 0) ? 1.0 : 0.0; } return prob/10000.0;