Merge pull request #2709 from lrineau/CGAL-fix_merge_of_PR_2478-GF

Fix the merge of PR #2478 into releases/CGAL-4.11-branch
This commit is contained in:
Laurent Rineau
2018-01-22 10:06:21 +01:00
committed by GitHub
439 changed files with 4320 additions and 64738 deletions
@@ -1043,6 +1043,7 @@ namespace CartesianKernelFunctors {
};
// TODO ...
template <typename K>
class Compute_squared_radius_2
{
@@ -1050,21 +1051,29 @@ namespace CartesianKernelFunctors {
typedef typename K::Point_2 Point_2;
typedef typename K::Circle_2 Circle_2;
public:
typedef FT result_type;
template<class>
struct result {
typedef FT type;
};
template<typename F>
struct result<F(Circle_2)> {
typedef const FT& type;
};
result_type
const FT&
operator()( const Circle_2& c) const
{ return c.rep().squared_radius(); }
result_type
FT
operator()( const Point_2& /*p*/) const
{ return FT(0); }
result_type
FT
operator()( const Point_2& p, const Point_2& q) const
{ return squared_radiusC2(p.x(), p.y(), q.x(), q.y()); }
result_type
FT
operator()( const Point_2& p, const Point_2& q, const Point_2& r) const
{ return squared_radiusC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); }
};