From 22300cbf77d5cfc679ffe70f5a901c3fc7de862d Mon Sep 17 00:00:00 2001 From: Susan Hert Date: Mon, 7 Jan 2002 17:45:14 +0000 Subject: [PATCH] fixed bug in compare_slopes for segments --- Packages/H2/changes.txt | 3 +++ .../H2/include/CGAL/Homogeneous/predicates_on_linesH2.h | 2 +- .../H2/include/CGAL/Homogeneous/predicates_on_segmentsH2.h | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Packages/H2/changes.txt b/Packages/H2/changes.txt index 69d6e026129..8e289c9a3c2 100644 --- a/Packages/H2/changes.txt +++ b/Packages/H2/changes.txt @@ -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. diff --git a/Packages/H2/include/CGAL/Homogeneous/predicates_on_linesH2.h b/Packages/H2/include/CGAL/Homogeneous/predicates_on_linesH2.h index d35684343ed..22d41bb9f87 100644 --- a/Packages/H2/include/CGAL/Homogeneous/predicates_on_linesH2.h +++ b/Packages/H2/include/CGAL/Homogeneous/predicates_on_linesH2.h @@ -199,7 +199,7 @@ compare_slopes(const LineH2& l1, const LineH2& 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()); diff --git a/Packages/H2/include/CGAL/Homogeneous/predicates_on_segmentsH2.h b/Packages/H2/include/CGAL/Homogeneous/predicates_on_segmentsH2.h index f51c59d8898..a07cfcde882 100644 --- a/Packages/H2/include/CGAL/Homogeneous/predicates_on_segmentsH2.h +++ b/Packages/H2/include/CGAL/Homogeneous/predicates_on_segmentsH2.h @@ -44,7 +44,7 @@ compare_slopes(const SegmentH2& s1, const SegmentH2& 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& s1, const SegmentH2& 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());