- Add missing functor for compare_yx().

This commit is contained in:
Sylvain Pion
2006-07-31 16:22:08 +00:00
parent e208720200
commit ead2e93fdb
13 changed files with 93 additions and 36 deletions
@@ -896,6 +896,37 @@ namespace HomogeneousKernelFunctors {
}
};
template <typename K>
class Compare_yx_2
{
typedef typename K::Point_2 Point_2;
public:
typedef typename K::Comparison_result result_type;
typedef Arity_tag< 2 > Arity;
result_type
operator()( const Point_2& p, const Point_2& q) const
{
typedef typename K::RT RT;
const RT& phx = p.hx();
const RT& phy = p.hy();
const RT& phw = p.hw();
const RT& qhx = q.hx();
const RT& qhy = q.hy();
const RT& qhw = q.hw();
RT pV = phy*qhw;
RT qV = qhy*phw;
if ( pV == qV )
{
pV = phx*qhw;
qV = qhx*phw;
}
return CGAL_NTS compare(pV, qV);
}
};
template <typename K>
class Compare_xy_3
{