mirror of https://github.com/CGAL/cgal
parent
c9c089ccc1
commit
432449b23b
|
|
@ -3904,10 +3904,11 @@ public:
|
|||
auto u = cv.u();
|
||||
auto v = cv.v();
|
||||
auto w = cv.w();
|
||||
Algebraic* ys_end = m_nt_traits->solve_quadratic_equation(t*t - four*r*s,
|
||||
two*t*u - four*r*v,
|
||||
u*u - four*r*w,
|
||||
ys);
|
||||
Algebraic* ys_end = m_nt_traits->template
|
||||
solve_quadratic_equation<Integer>(t*t - four*r*s,
|
||||
two*t*u - four*r*v,
|
||||
u*u - four*r*w,
|
||||
ys);
|
||||
auto n = static_cast<int>(ys_end - ys);
|
||||
|
||||
// Compute the x coordinates and construct the horizontal tangency points.
|
||||
|
|
@ -3915,7 +3916,7 @@ public:
|
|||
// Having computed y, x is the single solution to the quadratic equation
|
||||
// above, and since its discriminant is 0, x is simply given by:
|
||||
Algebraic x = -(m_nt_traits->convert(t)*ys[i] + m_nt_traits->convert(u)) /
|
||||
m_nt_traits->convert(two*r);
|
||||
m_nt_traits->convert(Integer(two*r));
|
||||
ps[i] = Point_2(x, ys[i]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ struct Curve_renderer_traits<CGAL::Interval_nt<true>, CORE::BigRat > :
|
|||
|
||||
//! Specialization for \c CORE::BigFloat
|
||||
template <>
|
||||
struct Curve_renderer_traits<CORE::BigFloat, class CORE::BigRat>
|
||||
struct Curve_renderer_traits<CORE::BigFloat, CORE::BigRat>
|
||||
: public Curve_renderer_traits_base<CORE::BigFloat, CORE::BigInt,
|
||||
CORE::BigRat> {
|
||||
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ public:
|
|||
if (n_ys == 0) return o; // no intersection
|
||||
|
||||
// the x coordinate of the solution points
|
||||
Algebraic xs = m / (2*a_diff);
|
||||
Algebraic xs = m / (Rational(2)*a_diff);
|
||||
|
||||
if (n_ys == 1) {
|
||||
// intersection is a point
|
||||
|
|
@ -340,7 +340,7 @@ public:
|
|||
}
|
||||
if (n_xs == 1) {
|
||||
// intersection is a point
|
||||
Point_2 inter_point(xs[0], (-2*a_diff*xs[0] + m)/(2*b_diff) );
|
||||
Point_2 inter_point(xs[0], (-Rational(2)*a_diff*xs[0] + m)/(Rational(2)*b_diff) );
|
||||
*o++ = inter_point;
|
||||
return o;
|
||||
}
|
||||
|
|
@ -350,8 +350,8 @@ public:
|
|||
// so we construct a COLLINEAR conic (with equation as in (1))
|
||||
// with 2 endpoints
|
||||
Algebraic ys[2];
|
||||
ys[0] = (-2*a_diff*xs[0] + m)/(2*b_diff);
|
||||
ys[1] = (-2*a_diff*xs[1] + m)/(2*b_diff);
|
||||
ys[0] = (-Rational(2)*a_diff*xs[0] + m)/(Rational(2)*b_diff);
|
||||
ys[1] = (-Rational(2)*a_diff*xs[1] + m)/(Rational(2)*b_diff);
|
||||
|
||||
Alg_point_2 end1(xs[0], ys[0]);
|
||||
Alg_point_2 end2(xs[1], ys[1]);
|
||||
|
|
@ -977,10 +977,10 @@ public:
|
|||
const Rational& u = cv.u();
|
||||
const Rational& v = cv.v();
|
||||
// const Rational& w = cv.w(); // unused
|
||||
Algebraic m = -1 * (2*r*x0 + t*y0 + u);
|
||||
Algebraic n = 2*s*y0 + t*x0 + v;
|
||||
Algebraic m = -1 * (Rational(2)*r*x0 + t*y0 + u);
|
||||
Algebraic n = Rational(2)*s*y0 + t*x0 + v;
|
||||
// line coefficients: A3, B3, C3
|
||||
Algebraic A3 = -1*m, B3 = n, C3 = m*x0 - n*y0;
|
||||
Algebraic A3 = -m, B3 = n, C3 = m*x0 - n*y0;
|
||||
|
||||
// the tangences of the spheres (in point (x0,y0,z0)):
|
||||
Algebraic z0 = compute_envelope_z_in_point(cv_point, s1);
|
||||
|
|
@ -1077,8 +1077,8 @@ public:
|
|||
Algebraic x_diff = x1 - a, y_diff = y1 - b;
|
||||
// the coefficients are:
|
||||
Algebraic A = 1;
|
||||
Algebraic B = -2*c;
|
||||
Algebraic C = x_diff*x_diff + y_diff*y_diff + c*c - sqr_r;
|
||||
Algebraic B = -Rational(2)*c;
|
||||
Algebraic C = x_diff*x_diff + y_diff*y_diff + Algebraic(c*c - sqr_r);
|
||||
|
||||
Algebraic zs[2];
|
||||
Algebraic* zs_end;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,6 @@ int main()
|
|||
|
||||
// CORE
|
||||
#ifdef CGAL_USE_CORE
|
||||
static_assert(CGAL::Output_rep<CORE::BigRat>::is_specialized == true);
|
||||
//bug in io for CORE.
|
||||
test_it<CORE::BigInt>("CORE::BigInt");
|
||||
test_it<CORE::BigRat>("CORE::BigRat");
|
||||
|
|
|
|||
Loading…
Reference in New Issue