diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index 5e03081750e..ae414761327 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -3098,7 +3098,16 @@ namespace HomogeneousKernelFunctors { } Point_2 - operator()(const Line_2& l, const FT i) const + operator()(const Line_2& l, const RT& i) const + { + Point_2 p = K().construct_point_2_object()(l); + Vector_2 v = K().construct_vector_2_object()(l); + return K().construct_translated_point_2_object() + (p, K().construct_scaled_vector_2_object()(v, i)); + } + + Point_2 + operator()(const Line_2& l, const FT& i) const { Point_2 p = K().construct_point_2_object()(l); Vector_2 v = K().construct_vector_2_object()(l); diff --git a/Kernel_23/include/CGAL/Line_2.h b/Kernel_23/include/CGAL/Line_2.h index 89a46f34c26..d1bff5b4f8b 100644 --- a/Kernel_23/include/CGAL/Line_2.h +++ b/Kernel_23/include/CGAL/Line_2.h @@ -31,6 +31,7 @@ #include #include #include +#include namespace CGAL { @@ -211,7 +212,19 @@ public: } Point_2 - point(const FT i) const + point(const int i) const + { + return R().construct_point_2_object()(*this, RT(i)); + } + + Point_2 + point(const RT& i) const + { + return R().construct_point_2_object()(*this,i); + } + + Point_2 + point(const typename First_if_different::Type& i) const { return R().construct_point_2_object()(*this,i); }