fixed problems with CGAL::sign(CGAL::Sign)

This commit is contained in:
Michael Hemmer 2006-10-28 13:07:32 +00:00
parent 1522751852
commit 9608231a02
5 changed files with 7 additions and 10 deletions

View File

@ -141,7 +141,7 @@ class ConicCPA2
-u()*u()*s()-v()*v()*r()+u()*v()*t(),
c0 = -FT(2)*a0*b1 + FT(3)*a1*b0;
return CGAL_NTS sign (-CGAL_NTS sign (c0)*o);
return CGAL_NTS sign ((int)-CGAL_NTS sign (c0)*o);
}
double vol_minimum (FT dr, FT ds, FT dt, FT du, FT dv, FT dw) const

View File

@ -141,7 +141,7 @@ class ConicHPA2
-u()*u()*s()-v()*v()*r()+u()*v()*t(),
c0 = -RT(2)*a0*b1 + RT(3)*a1*b0;
return CGAL_NTS sign (-CGAL_NTS sign (c0)*o);
return CGAL_NTS sign ((int)-CGAL_NTS sign (c0)*o);
}
double vol_minimum (RT dr, RT ds, RT dt, RT du, RT dv, RT dw) const
@ -272,15 +272,13 @@ class ConicHPA2
trivial = false;
RT z_prime = d*w() - u()*u()*s() - v()*v()*r() + u()*v()*t();
if (CGAL_NTS is_positive (r())) {
empty = CGAL_NTS is_positive(CGAL_NTS sign (z_prime));
empty = (CGAL::POSITIVE == CGAL_NTS sign (z_prime));
empty ? o = CGAL::POSITIVE : o = CGAL::NEGATIVE;
} else {
empty = CGAL_NTS is_negative(CGAL_NTS sign (z_prime));
empty = (CGAL::NEGATIVE == CGAL_NTS sign (z_prime));
empty ? o = CGAL::NEGATIVE : o = CGAL::POSITIVE;
}
degenerate = empty || CGAL_NTS is_zero (z_prime);
}
break;
}

View File

@ -1185,7 +1185,7 @@ public:
if (sign_eq == ZERO)
is_point = true;
Sign sign_disc = CGAL_NTS sign(sign_s * sign_eq);
Sign sign_disc = CGAL_NTS sign(int(sign_s * sign_eq));
return (sign_disc != NEGATIVE);
}
// if A = 0 we get (***) f(x) = (stv - 4su)*x + (v^2 - 4sw) = B*x + C

View File

@ -465,7 +465,7 @@ public:
// should also take care for the original and trasformed direction of
// the segment
Sign s2 = CGAL_NTS sign(w3 - w1);
Sign s = CGAL_NTS sign(s1 * s2);
Sign s = CGAL_NTS sign(int(s1 * s2));
bool use_one_segment = true;
if ((m_is_lower && s == NEGATIVE) ||

View File

@ -418,8 +418,7 @@ class Optimisation_ellipse_2 {
Conic c;
c.set_circle(boundary_point1, boundary_point2, boundary_point3);
set_d_values();
return (CGAL_NTS is_zero (c.vol_derivative
(dr, ds, dt, du, dv, dw)));
return (CGAL::ZERO == (c.vol_derivative(dr, ds, dt, du, dv, dw)));
}
default:
CGAL_optimisation_assertion( ( n_boundary_points >= 0) &&