From 93c47ec7021db0d402b84e9e43cd4033fbee1006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 30 Jun 2022 16:23:09 +0200 Subject: [PATCH] Use cmp_signed_dist_to_directionC2 for Compare_signed_distance_to_line_2 --- .../include/CGAL/Cartesian/function_objects.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 8980c453104..a93004ad293 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -631,7 +631,6 @@ namespace CartesianKernelFunctors { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename K::Equal_2 Equal_2; - typedef typename K::Less_signed_distance_to_line_2 Less_signed_distance_to_line_2; public: typedef typename K::Comparison_result result_type; @@ -641,7 +640,8 @@ namespace CartesianKernelFunctors { const Point_2& c, const Point_2& d) const { CGAL_kernel_precondition_code(Equal_2 equal;) - CGAL_kernel_precondition(! equal(a,b)); + CGAL_kernel_precondition(! equal(a,b)); + return cmp_signed_dist_to_lineC2( a.x(), a.y(), b.x(), b.y(), c.x(), c.y(), @@ -651,10 +651,9 @@ namespace CartesianKernelFunctors { result_type operator()(const Line_2& l, const Point_2& p, const Point_2& q) const { - Less_signed_distance_to_line_2 less = K().less_signed_distance_to_line_2_object(); - if (less(l, p, q)) return SMALLER; - if (less(l, q, p)) return LARGER; - return EQUAL; + return cmp_signed_dist_to_directionC2(l.a(), l.b(), + p.x(), p.y(), + q.x(), q.y()); } };