50 #ifndef CGAL_LINE_2_LINE_2_INTERSECTION_H
51 #define CGAL_LINE_2_LINE_2_INTERSECTION_H
69 #ifndef CGAL_CFG_RETURN_TYPE_BUG_2
75 typedef typename R::RT RT;
102 nom1, nom2, denom, dummyR)){
110 #endif // CGAL_CFG_RETURN_TYPE_BUG_2
128 pair_t pair(&p1, &p2);
129 return pair.intersection_type() != pair_t::NO;
143 is_t linepair(&line1, &line2);
144 switch (linepair.intersection_type()) {
150 linepair.intersection(pt);
154 return Object(
new Wrapper<
Line_2<R> >(line1));
164 template <
class R,
class POINT,
class RT>
167 typedef typename R::FT FT;
200 #ifndef CGAL_CFG_RETURN_TYPE_BUG_2
205 typedef typename R::RT RT;
208 RT nom1, nom2,
denom;
211 denom = _line1->a()*_line2->b() - _line2->a()*_line1->b();
212 if (denom == RT(0)) {
213 if (RT(0) == (_line1->a()*_line2->c() - _line2->a()*_line1->c()) &&
214 RT(0) == (_line1->b()*_line2->c() - _line2->b()*_line1->c()))
220 nom1 = (_line1->b()*_line2->c() - _line2->b()*_line1->c());
225 nom2 = (_line2->a()*_line1->c() - _line1->a()*_line2->c());
232 nom1, nom2, denom, dummyR)){
240 #endif // CGAL_CFG_RETURN_TYPE_BUG_2
248 if (_result != POINT)
250 pt = _intersection_point;
void int int REAL REAL * y
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE Object intersection(const Line_2< R > &line1, const Line_2< R > &line2)
bool do_intersect(const Line_2< R > &p1, const Line_2< R > &p2)
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool construct_if_finite(POINT &pt, RT x, RT y, RT w, R &)
Intersection_results _result
Line_2< R > const * _line2
Line_2< R > const * _line1
bool intersection(Point_2< R > &result) const
Point_2< R > _intersection_point
Intersection_results intersection_type() const
#define CGAL_BEGIN_NAMESPACE
CGAL_BEGIN_NAMESPACE void const NT NT NT NT & denom
#define CGAL_kernel_precondition(EX)
#define CGAL_END_NAMESPACE