Add compare_slope with 4 points

This commit is contained in:
Andreas Fabri
2021-04-30 17:39:57 +02:00
parent e7b91b92b8
commit 20d1629e1b
6 changed files with 72 additions and 23 deletions
@@ -606,6 +606,7 @@ namespace CartesianKernelFunctors {
template <typename K>
class Compare_slope_2
{
typedef typename K::Point_2 Point_2;
typedef typename K::Line_2 Line_2;
typedef typename K::Segment_2 Segment_2;
public:
@@ -625,6 +626,15 @@ namespace CartesianKernelFunctors {
s2.source().x(), s2.source().y(),
s2.target().x(), s2.target().y());
}
result_type
operator()(const Point_2& s1s, const Point_2& s1t, const Point_2& s2s, const Point_2& s2t) const
{
return compare_slopesC2(s1s.x(), s1s.y(),
s1t.x(), s1t.y(),
s2s.x(), s2s.y(),
s2t.x(), s2t.y());
}
};
template <typename K>