fixed bug in compare_slopes for segments

This commit is contained in:
Susan Hert 2002-01-07 17:45:14 +00:00
parent 33089848e2
commit 22300cbf77
3 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,6 @@
2.56 (7 January 2002)
- fixed bug in compare_slopes for segments
2.55 (7 January 2002)
- Make Iso_rectangleH2 only know R::Point_2, not R::Point_2_base.
- Move the Point_handle_2 typedefs in the main kernel classes, not bases.

View File

@ -199,7 +199,7 @@ compare_slopes(const LineH2<R>& l1, const LineH2<R>& l2)
SMALLER : Comparison_result(CGAL_NTS sign(l2.a() * l2.b()));
if (l2.is_horizontal())
return l1.is_vertical() ?
LARGER : Comparison_result(-CGAL_NTS sign(l1.a() * l1.b()));
LARGER : Comparison_result(- CGAL_NTS sign(l1.a() * l1.b()));
if (l1.is_vertical()) return l2.is_vertical() ? EQUAL : LARGER;
if (l2.is_vertical()) return SMALLER;
int l1_sign = CGAL_NTS sign(-l1.a() * l1.b());

View File

@ -44,7 +44,7 @@ compare_slopes(const SegmentH2<R>& s1, const SegmentH2<R>& s2)
FT s_hw = s2.source().hw();
FT t_hw = s2.target().hw();
return Comparison_result (
CGAL_NTS sign((s2.source().hy()*t_hw - s2.target().hy()*s_hw) *
- CGAL_NTS sign((s2.source().hy()*t_hw - s2.target().hy()*s_hw) *
(s2.source().hx()*t_hw - s2.target().hx()*s_hw)) );
}
@ -57,8 +57,8 @@ compare_slopes(const SegmentH2<R>& s1, const SegmentH2<R>& s2)
FT s_hw = s2.source().hw();
FT t_hw = s2.target().hw();
return Comparison_result (
CGAL_NTS sign((s1.source().hy()*s_hw - s1.target().hy()*t_hw) *
(s1.source().hx()*s_hw - s1.target().hx()*t_hw)) );
CGAL_NTS sign((s1.source().hy()*t_hw - s1.target().hy()*s_hw) *
(s1.source().hx()*t_hw - s1.target().hx()*s_hw)) );
}
Comparison_result cmp_x1 = compare_x(s1.source(), s1.target());