mirror of https://github.com/CGAL/cgal
Use cmp_signed_dist_to_directionC2 for Compare_signed_distance_to_line_2
This commit is contained in:
parent
2b245d870e
commit
93c47ec702
|
|
@ -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());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue