mirror of https://github.com/CGAL/cgal
Fix arrangement demo
This commit is contained in:
parent
2de196ac3e
commit
1c00c6490e
|
|
@ -210,7 +210,7 @@ operator()(const Point_2& p, const X_monotone_curve_2& curve) const
|
|||
auto points = painterOstream.getPointsList(curve);
|
||||
|
||||
QPoint p_viewport =
|
||||
view->mapFromScene(QPointF{p.x().doubleValue(), p.y().doubleValue()});
|
||||
view->mapFromScene(QPointF{CGAL::to_double(p.x()), CGAL::to_double(p.y())});
|
||||
|
||||
double minDist = (std::numeric_limits<double>::max)();
|
||||
for (auto& vec : points)
|
||||
|
|
|
|||
|
|
@ -862,7 +862,7 @@ void draw(const Arc_2& arc,
|
|||
get_pixel_coords(l, y_clip, pix_beg);
|
||||
get_pixel_coords(ptmp->left, it->second ? engine.y_max_r :
|
||||
engine.y_min_r, pix_end);
|
||||
if(CGAL_ABS(ptmp->left - l) <= engine.pixel_w_r*2) {
|
||||
if(CGAL_ABS(Rational(ptmp->left - l)) <= engine.pixel_w_r*2) {
|
||||
|
||||
Coordinate_2 xy(Coordinate_1(pt), *support, arc.arcno());
|
||||
Rational _;
|
||||
|
|
|
|||
|
|
@ -694,7 +694,7 @@ bool get_range_QF_1(int var, const NT& l_, const NT& r_, const NT& key,
|
|||
while(der_it != der_begin) {
|
||||
--der_it;
|
||||
|
||||
e1 = xsum_abs * e1 + CGAL_ABS(x1 * z1);
|
||||
e1 = xsum_abs * e1 + CGAL_ABS(NT(x1 * z1));
|
||||
z1 = x0*z1 + x1*y1;
|
||||
y1 = y1*x0 + x1*y0;
|
||||
y0 = x0*y0 + extract(*cache_it)*(*der_it);
|
||||
|
|
@ -725,7 +725,7 @@ bool get_range_QF_1(int var, const NT& l_, const NT& r_, const NT& key,
|
|||
NT y0 = extract(*cache_it), y1(0), z1(0), e1(0);
|
||||
while(cache_it != begin) {
|
||||
--cache_it;
|
||||
e1 = xsum_abs * e1 + CGAL_ABS(x1*z1);
|
||||
e1 = xsum_abs * e1 + CGAL_ABS(NT(x1*z1));
|
||||
z1 = x0*z1 + x1*y1;
|
||||
y1 = y1*x0 + x1*y0;
|
||||
y0 = x0*y0 + extract(*cache_it);
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ struct Curve_renderer_traits<CORE::BigFloat, class CORE::BigRat>
|
|||
typedef Integer result_type;
|
||||
|
||||
Integer operator()(const Rational& x) const {
|
||||
return x.BigIntValue();
|
||||
return numerator(x)/denominator(x);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -397,7 +397,7 @@ struct Curve_renderer_traits<CORE::BigRat, CORE::BigRat> :
|
|||
typedef Integer result_type;
|
||||
|
||||
Integer operator()(const Rational& x) const {
|
||||
return x.BigIntValue();
|
||||
return numerator(x)/denominator(x);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -406,9 +406,7 @@ struct Curve_renderer_traits<CORE::BigRat, CORE::BigRat> :
|
|||
typedef std::size_t result_type;
|
||||
|
||||
inline result_type operator()(const Float& key) const {
|
||||
const CORE::BigRatRep& rep = key.getRep();
|
||||
std::size_t ret = reinterpret_cast<std::size_t>(&rep);
|
||||
return ret;
|
||||
return std::hash<Float>()(key);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue