From 5c2b8ea6f6aa9766a017e7a194ffa61b5330010b Mon Sep 17 00:00:00 2001 From: Susan Hert Date: Wed, 2 May 2001 09:42:49 +0000 Subject: [PATCH] fixed bug in compare_x_at_y --- Packages/H2/changes.txt | 3 +++ Packages/H2/include/CGAL/predicates_on_linesH2.h | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Packages/H2/changes.txt b/Packages/H2/changes.txt index fceb527c570..dd18214b869 100644 --- a/Packages/H2/changes.txt +++ b/Packages/H2/changes.txt @@ -1,3 +1,6 @@ +2.28 (?? May 2001) +- refixed compare_x_at_y() + 2.27 (1 May 2001) - angle() - fixed compare_x_at_y() diff --git a/Packages/H2/include/CGAL/predicates_on_linesH2.h b/Packages/H2/include/CGAL/predicates_on_linesH2.h index 2b59293fb1b..fc4f509ff08 100644 --- a/Packages/H2/include/CGAL/predicates_on_linesH2.h +++ b/Packages/H2/include/CGAL/predicates_on_linesH2.h @@ -138,15 +138,15 @@ compare_x_at_y(const PointH2& p, typedef typename R::RT RT; CGAL_kernel_precondition( ! h.is_horizontal() ); Oriented_side ors = h.oriented_side( p ); - if ( h.b() < RT(0) ) + if ( h.a() < RT(0) ) { ors = opposite( ors ); } if ( ors == ON_POSITIVE_SIDE ) { - return SMALLER; + return LARGER; } - return ( ors == ON_NEGATIVE_SIDE ) ? LARGER : EQUAL; + return ( ors == ON_NEGATIVE_SIDE ) ? SMALLER : EQUAL; } template