mirror of https://github.com/CGAL/cgal
Removed rounding for Gmpq as it may change orientation of points
This commit is contained in:
parent
faf9a99f21
commit
2e1eba889e
|
|
@ -1,3 +1,6 @@
|
|||
29 March 2006 Andreas Fabri
|
||||
- Removed rounding for Gmpq as it may change orientation of points
|
||||
|
||||
09 March 2006 Joachim Reichel
|
||||
- LGPL copyright notice added to src/CGALQt/makefile
|
||||
|
||||
|
|
|
|||
|
|
@ -142,10 +142,7 @@ public:
|
|||
void x_real(int, FT&) const;
|
||||
template <class FT>
|
||||
void y_real(int y, FT&) const;
|
||||
#ifdef CGAL_USE_GMP
|
||||
void x_real(int, Gmpq&) const;
|
||||
void y_real(int, Gmpq&) const;
|
||||
#endif
|
||||
|
||||
|
||||
double x_real_dist(double d) const;
|
||||
double y_real_dist(double d) const;
|
||||
|
|
@ -764,14 +761,7 @@ void Qt_widget::x_real(int x, FT& return_t) const
|
|||
if(xscal<1)
|
||||
return_t = static_cast<FT>(xmin+(int)(x/xscal));
|
||||
else{
|
||||
#ifdef CGAL_USE_GMP
|
||||
CGAL_Rational r = simplest_rational_in_interval<CGAL_Rational>(
|
||||
xmin+x/xscal-(x/xscal-(x-1)/xscal)/2,
|
||||
xmin+x/xscal+((x+1)/xscal-x/xscal)/2);
|
||||
return_t = static_cast<FT>(CGAL::to_double(r));
|
||||
#else
|
||||
return_t = static_cast<FT>(xmin+x/xscal);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -781,14 +771,7 @@ void Qt_widget::y_real(int y, FT& return_t) const
|
|||
if(yscal<1)
|
||||
return_t = static_cast<FT>(ymax-(int)(y/yscal));
|
||||
else{
|
||||
#ifdef CGAL_USE_GMP
|
||||
CGAL_Rational r = simplest_rational_in_interval<CGAL_Rational>(
|
||||
ymax - y/yscal-(y/yscal-(y-1)/yscal)/2,
|
||||
ymax - y/yscal+((y+1)/yscal-y/yscal)/2);
|
||||
return_t = static_cast<FT>(CGAL::to_double(r));
|
||||
#else
|
||||
return_t = static_cast<FT>(ymax-y/yscal);
|
||||
#endif
|
||||
return_t = static_cast<FT>(ymax-y/yscal);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -404,22 +404,6 @@ void Qt_widget::zoom(double ratio)
|
|||
ymin + (ymax - ymin) / 2 );
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_GMP
|
||||
void Qt_widget::x_real(int x, Gmpq& return_t) const
|
||||
{
|
||||
return_t = simplest_rational_in_interval<Gmpq>(
|
||||
xmin+x/xscal-(1/xscal)/2,
|
||||
xmin+x/xscal+(1/xscal)/2);
|
||||
}
|
||||
|
||||
void Qt_widget::y_real(int y, Gmpq& return_t) const
|
||||
{
|
||||
return_t = simplest_rational_in_interval<Gmpq>(
|
||||
ymax - y/yscal-(1/yscal)/2,
|
||||
ymax - y/yscal+(1/yscal)/2);
|
||||
}
|
||||
#endif
|
||||
|
||||
double Qt_widget::x_real(int x) const
|
||||
{
|
||||
if(xscal<1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue