Fix Homogeneous

This commit is contained in:
Andreas Fabri 2020-01-30 15:24:52 +01:00
parent c94fbd2399
commit add08198f5
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,34 @@
#include <iostream>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/squared_distance_2.h>
typedef CGAL::Simple_cartesian<double> SC;
typedef CGAL::Simple_cartesian<CGAL::Gmpq> EC;
template <typename Kernel>
int fct() {
typedef Kernel::Segment_2 Segment_2;
const Segment_2 segi = {
{ -4.0380854964382, -1.9947196614192 },
{ 10.43442091460618, -0.5886833953492263 } };
const Segment_2 segj = {
{ -11.5138934277993, -2.721011070186227 },
{ -8.822747585009402, -2.459560251317805 } };
const auto dist = CGAL::squared_distance(segi, segj);
std::cout << "#dist: " << dist << std::endl;
return 0;
}
int main()
{
fct<SC>();
fct<CGAL::Epick>();
fct<EC>();
return 0;
}

View File

@ -4153,7 +4153,7 @@ namespace HomogeneousKernelFunctors {
operator()(const Point_2& p, const Point_2& q,
const Point_2& r, const Point_2& s) const
{
return Compare_signed_distance_to_line_2<K>::operator()(p, q, r, s) == SMALLER;
return Compare_signed_distance_to_line_2<K>().operator()(p, q, r, s) == SMALLER;
}
result_type