Fix bug in point_position in the brazier traits

This commit is contained in:
Ahmed Essam 2020-03-12 23:14:42 +02:00
parent 3a64414705
commit a7eb7cfe04
1 changed files with 3 additions and 2 deletions

View File

@ -959,11 +959,12 @@ _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::point_position
if ( p.is_rational() ){
const Rational& px = ((Rat_point_2) p).x();
const Rational px = ((Rat_point_2) p).x();
Integer denom_px=nt_traits.denominator(px);
Integer numer_px=nt_traits.numerator(px);
Polynomial poly_px = CGAL::sign(numer_px) == ZERO ? Polynomial() : nt_traits.construct_polynomial(&numer_px,0);
Integer poly_px_scale = numer_px * _curve.x_norm();
Polynomial poly_px = CGAL::sign(numer_px) == ZERO ? Polynomial() : nt_traits.construct_polynomial(&poly_px_scale,0);
Polynomial poly_x = nt_traits.scale(_curve.x_polynomial(),denom_px) - poly_px;
std::vector <Algebraic> roots;