small features to add additional operator() to Angle_2.

This is a merge from the branch /branches/experimental-packages/More_robust_Triangulation_2-branch
This commit is contained in:
Sébastien Loriot
2011-01-07 10:45:13 +00:00
parent ace9c87934
commit 78a8e36522
9 changed files with 130 additions and 6 deletions
@@ -56,6 +56,7 @@ namespace HomogeneousKernelFunctors {
class Angle_2
{
typedef typename K::Point_2 Point_2;
typedef typename K::Vector_2 Vector_2;
typedef typename K::Construct_vector_2 Construct_vector_2;
Construct_vector_2 c;
public:
@@ -66,7 +67,17 @@ namespace HomogeneousKernelFunctors {
result_type
operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
{ return enum_cast<Angle>(CGAL_NTS sign(c(q,p) * c(q,r))); }
{ return operator()(c(q,p), c(q,r)); }
result_type
operator()(const Point_2& p, const Point_2& q,
const Point_2& r, const Point_2& s) const
{ return operator()(c(q,p), c(s,r)); }
result_type
operator()(const Vector_2& u, const Vector_2& v) const
{ return enum_cast<Angle>(CGAL_NTS sign(u * v)); }
// FIXME: scalar product
};