mirror of https://github.com/CGAL/cgal
Merge pull request #2188 from sloriot/CGAL-prefix_sign
Quality calls to sign
This commit is contained in:
commit
fc1ef1d936
|
|
@ -2009,7 +2009,7 @@ public:
|
|||
std::make_pair(x_pair.first,
|
||||
x_pair.second));
|
||||
CGAL::Sign s_lower = CGAL::sign(iv.first);
|
||||
if(s_lower == sign(iv.second)) {
|
||||
if(s_lower == CGAL::sign(iv.second)) {
|
||||
return s_lower;
|
||||
} else {
|
||||
prec*=2;
|
||||
|
|
@ -2111,7 +2111,7 @@ public:
|
|||
y_pair.first,
|
||||
y_pair.second));
|
||||
CGAL::Sign s_lower = CGAL::sign(iv.first);
|
||||
if(s_lower == sign(iv.second)) {
|
||||
if(s_lower == CGAL::sign(iv.second)) {
|
||||
return s_lower;
|
||||
} else {
|
||||
prec*=2;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace internal {
|
|||
int variations = 0;
|
||||
int old_sign = CGAL::sign(P[n]); // never zero unless P is zero
|
||||
for (int i = n-1; i >= 0; i--) {
|
||||
int s = sign(P[i]);
|
||||
int s = CGAL::sign(P[i]);
|
||||
if (s == 0) continue;
|
||||
if (old_sign != s) {
|
||||
old_sign = s;
|
||||
|
|
|
|||
|
|
@ -3696,7 +3696,7 @@ _compute_signs(const DHalfedge* he_anchor, boost::mpl::bool_<true>) const
|
|||
} while (he_curr != he_end);
|
||||
|
||||
// Return the leftmost vertex and its x_index (with respect to he_before).
|
||||
return (std::make_pair(sign(x_index), sign(y_index)));
|
||||
return (std::make_pair(CGAL::sign(x_index), CGAL::sign(y_index)));
|
||||
}
|
||||
|
||||
// Computes the halfedge that points at the smallest vertex in a closed ccb
|
||||
|
|
@ -3823,7 +3823,7 @@ _compute_signs_and_min(const DHalfedge* he_anchor,
|
|||
} while (he_next != he_end);
|
||||
|
||||
// Return the leftmost vertex and the signs.
|
||||
return std::make_pair(std::make_pair(sign(x_index), sign(y_index)), he_min);
|
||||
return std::make_pair(std::make_pair(CGAL::sign(x_index), CGAL::sign(y_index)), he_min);
|
||||
}
|
||||
|
||||
/* This is the implementation for the case where all 4 boundary sides are
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ NTT &t, const Kernel &k)
|
|||
if (v.inf() >0) return POSITIVE;
|
||||
else if (v.sup() < 0) return NEGATIVE;
|
||||
else if (v.inf()==v.sup()) {
|
||||
return sign(v);
|
||||
return CGAL::sign(v);
|
||||
}
|
||||
else {
|
||||
//std::cout << "Falling back on exact.\n";
|
||||
|
|
@ -54,7 +54,7 @@ NTT &t, const Kernel &k)
|
|||
//typename CGAL::NT_converter<NTT, typename Kernel::Exact_kernel::Function::NT> ec;
|
||||
typename Kernel::Exact_kernel::NT et= k.exact_function_converter_object().nt_converter()(t);
|
||||
|
||||
return sign(fh.exact_function().value_at(et));
|
||||
return CGAL::sign(fh.exact_function().value_at(et));
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ bool sorted_around_edge(
|
|||
CGAL_precondition( !coplanar(O_prime,O,P2,Q)
|
||||
|| coplanar_orientation(O,O_prime,P2,Q)==NEGATIVE );
|
||||
|
||||
Sign s0 = sign( determinant(O-O_prime,P1-O,P2-O) );
|
||||
Sign s0 = CGAL::sign( determinant(O-O_prime,P1-O,P2-O) );
|
||||
|
||||
if ( s0==ZERO ) {
|
||||
//O, O_prime, P1 and P2 are coplanar
|
||||
|
|
@ -70,8 +70,8 @@ bool sorted_around_edge(
|
|||
}
|
||||
|
||||
//O, O_prime, P1 and P2 are not coplanar
|
||||
Sign s1 = sign( determinant(O-O_prime,P1-O,Q -O) );
|
||||
Sign s2 = sign( determinant(O-O_prime,Q -O,P2-O) );
|
||||
Sign s1 = CGAL::sign( determinant(O-O_prime,P1-O,Q -O) );
|
||||
Sign s2 = CGAL::sign( determinant(O-O_prime,Q -O,P2-O) );
|
||||
|
||||
if (s0 == POSITIVE) // the angle P1,O,P2 is smaller that Pi.
|
||||
return ( s1 == POSITIVE )
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ public:
|
|||
if ( orient_3!=COPLANAR &&
|
||||
(
|
||||
//indicates whether the ray is oriented toward the positive side of the plane
|
||||
( POSITIVE == sign( query.to_vector().z() ) )
|
||||
( POSITIVE == CGAL::sign( query.to_vector().z() ) )
|
||||
==
|
||||
//indicates whether the source of the ray is in the positive side of the plane
|
||||
(orient_3==POSITIVE)
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ public:
|
|||
* \sa `estimate_neighborhood_squared_radius()`.
|
||||
*/
|
||||
bool has_neighborhood_squared_radius() const {
|
||||
return sign( _squared_radius ) == POSITIVE;
|
||||
return CGAL::sign( _squared_radius ) == POSITIVE;
|
||||
}
|
||||
|
||||
/// \cond internal_doc
|
||||
|
|
|
|||
Loading…
Reference in New Issue