fixed bug in compare_x_at_y

This commit is contained in:
Susan Hert 2001-05-02 09:42:49 +00:00
parent 33fa3dc6f8
commit 5c2b8ea6f6
2 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,6 @@
2.28 (?? May 2001)
- refixed compare_x_at_y()
2.27 (1 May 2001)
- angle()
- fixed compare_x_at_y()

View File

@ -138,15 +138,15 @@ compare_x_at_y(const PointH2<R>& 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 <class R>