mirror of https://github.com/CGAL/cgal
fixed problems with CGAL::sign(CGAL::Sign)
This commit is contained in:
parent
1522751852
commit
9608231a02
|
|
@ -141,7 +141,7 @@ class ConicCPA2
|
||||||
-u()*u()*s()-v()*v()*r()+u()*v()*t(),
|
-u()*u()*s()-v()*v()*r()+u()*v()*t(),
|
||||||
c0 = -FT(2)*a0*b1 + FT(3)*a1*b0;
|
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
|
double vol_minimum (FT dr, FT ds, FT dt, FT du, FT dv, FT dw) const
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ class ConicHPA2
|
||||||
-u()*u()*s()-v()*v()*r()+u()*v()*t(),
|
-u()*u()*s()-v()*v()*r()+u()*v()*t(),
|
||||||
c0 = -RT(2)*a0*b1 + RT(3)*a1*b0;
|
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
|
double vol_minimum (RT dr, RT ds, RT dt, RT du, RT dv, RT dw) const
|
||||||
|
|
@ -272,15 +272,13 @@ class ConicHPA2
|
||||||
trivial = false;
|
trivial = false;
|
||||||
RT z_prime = d*w() - u()*u()*s() - v()*v()*r() + u()*v()*t();
|
RT z_prime = d*w() - u()*u()*s() - v()*v()*r() + u()*v()*t();
|
||||||
if (CGAL_NTS is_positive (r())) {
|
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;
|
empty ? o = CGAL::POSITIVE : o = CGAL::NEGATIVE;
|
||||||
} else {
|
} 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;
|
empty ? o = CGAL::NEGATIVE : o = CGAL::POSITIVE;
|
||||||
}
|
}
|
||||||
degenerate = empty || CGAL_NTS is_zero (z_prime);
|
degenerate = empty || CGAL_NTS is_zero (z_prime);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1185,7 +1185,7 @@ public:
|
||||||
if (sign_eq == ZERO)
|
if (sign_eq == ZERO)
|
||||||
is_point = true;
|
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);
|
return (sign_disc != NEGATIVE);
|
||||||
}
|
}
|
||||||
// if A = 0 we get (***) f(x) = (stv - 4su)*x + (v^2 - 4sw) = B*x + C
|
// if A = 0 we get (***) f(x) = (stv - 4su)*x + (v^2 - 4sw) = B*x + C
|
||||||
|
|
|
||||||
|
|
@ -465,7 +465,7 @@ public:
|
||||||
// should also take care for the original and trasformed direction of
|
// should also take care for the original and trasformed direction of
|
||||||
// the segment
|
// the segment
|
||||||
Sign s2 = CGAL_NTS sign(w3 - w1);
|
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;
|
bool use_one_segment = true;
|
||||||
if ((m_is_lower && s == NEGATIVE) ||
|
if ((m_is_lower && s == NEGATIVE) ||
|
||||||
|
|
|
||||||
|
|
@ -418,8 +418,7 @@ class Optimisation_ellipse_2 {
|
||||||
Conic c;
|
Conic c;
|
||||||
c.set_circle(boundary_point1, boundary_point2, boundary_point3);
|
c.set_circle(boundary_point1, boundary_point2, boundary_point3);
|
||||||
set_d_values();
|
set_d_values();
|
||||||
return (CGAL_NTS is_zero (c.vol_derivative
|
return (CGAL::ZERO == (c.vol_derivative(dr, ds, dt, du, dv, dw)));
|
||||||
(dr, ds, dt, du, dv, dw)));
|
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
CGAL_optimisation_assertion( ( n_boundary_points >= 0) &&
|
CGAL_optimisation_assertion( ( n_boundary_points >= 0) &&
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue