mirror of https://github.com/CGAL/cgal
replaced CGAL_NTS by CGAL::
This commit is contained in:
parent
adf757346c
commit
31f3b34f87
|
|
@ -688,7 +688,7 @@ protected:
|
|||
} else {
|
||||
Site_2 wp = circumcircle(f);
|
||||
typename Gt::Rep::Circle_2 c(wp.point(),
|
||||
CGAL_NTS square(wp.weight()));
|
||||
CGAL::square(wp.weight()));
|
||||
str << c;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ private:
|
|||
public:
|
||||
Object_2 operator() (const Site_2& p, const Site_2& q) const
|
||||
{
|
||||
Comparison_result cr = CGAL_NTS compare(p.weight(), q.weight());
|
||||
Comparison_result cr = CGAL::compare(p.weight(), q.weight());
|
||||
if ( cr == EQUAL ) {
|
||||
Line_2 l1(p.point(), q.point());
|
||||
Line_2 l = l1.perpendicular(midpoint(p.point(), q.point()));
|
||||
|
|
@ -213,7 +213,7 @@ public:
|
|||
const Point_2& r,
|
||||
const Hyperbola_direction& direction) const {
|
||||
//
|
||||
Comparison_result cr = CGAL_NTS compare(p.weight(), q.weight());
|
||||
Comparison_result cr = CGAL::compare(p.weight(), q.weight());
|
||||
if ( cr == EQUAL ) {
|
||||
Line_2 l1(q, p);
|
||||
Line_2 l = l1.perpendicular(midpoint(p.point(), q.point()));
|
||||
|
|
@ -229,7 +229,7 @@ public:
|
|||
const Site_2& q,
|
||||
const Site_2& r) const {
|
||||
Point_2 c = Apollonius_vertex_2()(p, q, r);
|
||||
Comparison_result cr = CGAL_NTS compare(p.weight(), q.weight());
|
||||
Comparison_result cr = CGAL::compare(p.weight(), q.weight());
|
||||
if ( cr == EQUAL ) {
|
||||
Line_2 l1(q.point(), p.point());
|
||||
Line_2 l = l1.perpendicular(midpoint(p.point(), q.point()));
|
||||
|
|
@ -269,7 +269,7 @@ public:
|
|||
const Site_2& q,
|
||||
const Point_2& r, const Point_2& s) const {
|
||||
//
|
||||
Comparison_result cr = CGAL_NTS compare(p.weight(), q.weight());
|
||||
Comparison_result cr = CGAL::compare(p.weight(), q.weight());
|
||||
if ( cr == EQUAL ) {
|
||||
Segment_2 seg(r, s);
|
||||
return make_object(seg);
|
||||
|
|
@ -286,7 +286,7 @@ public:
|
|||
Point_2 c_pqr = apollonius_vertex_2(p,q,r);
|
||||
Point_2 c_qps = apollonius_vertex_2(q,p,s);
|
||||
//
|
||||
Comparison_result cr = CGAL_NTS compare(p.weight(), q.weight());
|
||||
Comparison_result cr = CGAL::compare(p.weight(), q.weight());
|
||||
if ( cr == EQUAL ) {
|
||||
Segment_2 seg(c_pqr, c_qps);
|
||||
return make_object(seg);
|
||||
|
|
@ -323,10 +323,8 @@ public:
|
|||
Line_2 l1 = apollonius_circle_2(r, p);
|
||||
Line_2 l2 = apollonius_circle_2(p, s);
|
||||
|
||||
RT d1 = CGAL_NTS sqrt( CGAL_NTS square(l1.a()) +
|
||||
CGAL_NTS square(l1.b()) );
|
||||
RT d2 = CGAL_NTS sqrt( CGAL_NTS square(l2.a()) +
|
||||
CGAL_NTS square(l2.b()) );
|
||||
RT d1 = CGAL::sqrt( CGAL::square(l1.a()) + CGAL::square(l1.b()) );
|
||||
RT d2 = CGAL::sqrt( CGAL::square(l2.a()) + CGAL::square(l2.b()) );
|
||||
RT a = l1.a() / d1 - l2.a() / d2;
|
||||
RT b = l1.b() / d1 - l2.b() / d2;
|
||||
Point_2 c(p.x() + b, p.y() - a);
|
||||
|
|
@ -375,7 +373,7 @@ public:
|
|||
const Site_2& q,
|
||||
const Point_2& r, const Point_2& s) const {
|
||||
//
|
||||
Comparison_result cr = CGAL_NTS compare(p.weight(), q.weight());
|
||||
Comparison_result cr = CGAL::compare(p.weight(), q.weight());
|
||||
if ( cr == EQUAL ) {
|
||||
Segment_2 seg(r, s);
|
||||
return make_object(seg);
|
||||
|
|
@ -393,7 +391,7 @@ public:
|
|||
Site_2 c_pqr = apollonius_circle_2(p, q, r);
|
||||
Site_2 c_qps = apollonius_circle_2(q, p, s);
|
||||
//
|
||||
Comparison_result cr = CGAL_NTS compare(c_pqr.weight(), c_qps.weight());
|
||||
Comparison_result cr = CGAL::compare(c_pqr.weight(), c_qps.weight());
|
||||
if ( cr == EQUAL ) {
|
||||
Segment_2 seg(p.point(), q.point());
|
||||
return make_object(seg);
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ void
|
|||
invert_C2(const FT &x, const FT &y, const FT &wt,
|
||||
FT &new_x, FT &new_y, FT &new_wt)
|
||||
{
|
||||
FT p = CGAL_NTS square(x) + CGAL_NTS square(y) - CGAL_NTS square(wt);
|
||||
FT p = CGAL::square(x) + CGAL::square(y) - CGAL::square(wt);
|
||||
|
||||
CGAL_assertion( CGAL_NTS is_positive(p) );
|
||||
CGAL_assertion( CGAL::is_positive(p) );
|
||||
|
||||
new_x = x / p;
|
||||
new_y = -y / p;
|
||||
|
|
@ -71,9 +71,9 @@ w_plane_tangent_line_2(const FT &x1, const FT &y1, const FT &w1,
|
|||
FT Dur = det2x2_by_formula(u2, r2, u3, r3);
|
||||
FT Dvr = det2x2_by_formula(v2, r2, v3, r3);
|
||||
|
||||
FT D1 = CGAL_NTS square(Du) + CGAL_NTS square(Dv);
|
||||
FT D1 = CGAL::square(Du) + CGAL::square(Dv);
|
||||
FT D1inv = FT(1) / D1;
|
||||
FT sqrtD = CGAL_NTS sqrt(D1 - CGAL_NTS square(Dr));
|
||||
FT sqrtD = CGAL::sqrt(D1 - CGAL::square(Dr));
|
||||
|
||||
a = (Du * Dr - Dv * sqrtD) * D1inv;
|
||||
b = (Dv * Dr + Du * sqrtD) * D1inv;
|
||||
|
|
@ -101,10 +101,10 @@ z_plane_circumcircle_2(const FT &x1, const FT &y1, const FT &w1,
|
|||
// this the only part that is computed at vain when only the center
|
||||
// is needed.
|
||||
#if 0
|
||||
FT cwt2 = (CGAL_NTS square(a) + CGAL_NTS square(b)) /
|
||||
(FT(4) * CGAL_NTS square(c));
|
||||
FT cwt2 = (CGAL::square(a) + CGAL::square(b)) /
|
||||
(FT(4) * CGAL::square(c));
|
||||
#endif
|
||||
// cwt = CGAL_NTS sqrt(cwt2) - FT(w1);
|
||||
// cwt = CGAL::sqrt(cwt2) - FT(w1);
|
||||
cwt = FT(1) / (FT(2) * c) - FT(w1);
|
||||
}
|
||||
|
||||
|
|
@ -133,15 +133,15 @@ ad_circumcircleC2(const FT &x1, const FT &y1, const FT &w1,
|
|||
const FT &x3, const FT &y3, const FT &w3,
|
||||
FT &cx, FT &cy, FT &cwt)
|
||||
{
|
||||
if (CGAL_NTS compare(w2, w1) != LARGER &&
|
||||
CGAL_NTS compare(w2, w3) != LARGER) {
|
||||
if (CGAL::compare(w2, w1) != LARGER &&
|
||||
CGAL::compare(w2, w3) != LARGER) {
|
||||
z_plane_circumcircle_2(x2, y2, w2,
|
||||
x3, y3, w3,
|
||||
x1, y1, w1,
|
||||
cx, cy, cwt);
|
||||
return;
|
||||
} else if (CGAL_NTS compare(w3, w1) != LARGER &&
|
||||
CGAL_NTS compare(w3, w2) != LARGER) {
|
||||
} else if (CGAL::compare(w3, w1) != LARGER &&
|
||||
CGAL::compare(w3, w2) != LARGER) {
|
||||
z_plane_circumcircle_2(x3, y3, w3,
|
||||
x1, y1, w1,
|
||||
x2, y2, w2,
|
||||
|
|
@ -168,10 +168,10 @@ ad_left_bitangent_lineC2(const FT &x1, const FT &y1, const FT &w1,
|
|||
FT dyw = det2x2_by_formula(y1, w1, y2, w2);
|
||||
FT dxy = det2x2_by_formula(x1, y1, x2, y2);
|
||||
|
||||
FT D1 = CGAL_NTS square(dx) + CGAL_NTS square(dy);
|
||||
FT D1 = CGAL::square(dx) + CGAL::square(dy);
|
||||
FT invD1 = FT(1) / D1;
|
||||
FT D = D1 - CGAL_NTS square(dw);
|
||||
FT sqrtD = CGAL_NTS sqrt(D);
|
||||
FT D = D1 - CGAL::square(dw);
|
||||
FT sqrtD = CGAL::sqrt(D);
|
||||
|
||||
a = -(dx * dw - dy * sqrtD) * invD1;
|
||||
b = -(dy * dw + dx * sqrtD) * invD1;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
Comparison_result operator()(const Site_2& p,
|
||||
const Site_2& q) const
|
||||
{
|
||||
return CGAL_NTS compare(p.weight(), q.weight());
|
||||
return CGAL::compare(p.weight(), q.weight());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ ad_is_hidden_test_2(const typename K::Site_2& p,
|
|||
q.hx(), q.hy(), q.hw(),
|
||||
q.weight());
|
||||
if ( s == POSITIVE ) { return false; }
|
||||
return (CGAL_NTS compare(p.weight(), q.weight()) != SMALLER);
|
||||
return (CGAL::compare(p.weight(), q.weight()) != SMALLER);
|
||||
}
|
||||
|
||||
template < class K, class Method_tag >
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ operator<<(Qt_widget &qt_w, const Apollonius_site_2<K>& wp)
|
|||
typedef typename K::Point_2 Point_2;
|
||||
|
||||
Point_2 p(wp.point());
|
||||
Circle_2 c(p, CGAL_NTS square(wp.weight()));
|
||||
Circle_2 c(p, CGAL::square(wp.weight()));
|
||||
return qt_w << p << c;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ protected:
|
|||
inline
|
||||
FT norm2(const Point_2& p) const
|
||||
{
|
||||
return (CGAL_NTS square(p.x()) + CGAL_NTS square(p.y()));
|
||||
return (CGAL::square(p.x()) + CGAL::square(p.y()));
|
||||
}
|
||||
|
||||
inline
|
||||
|
|
@ -94,20 +94,20 @@ protected:
|
|||
{
|
||||
FT dx = p1.x()-p2.x();
|
||||
FT dy = p1.y()-p2.y();
|
||||
return (CGAL_NTS square(dx) + CGAL_NTS square(dy));
|
||||
return (CGAL::square(dx) + CGAL::square(dy));
|
||||
}
|
||||
|
||||
inline
|
||||
FT distance(const Point_2& p1, const Point_2& p2) const
|
||||
{
|
||||
return CGAL_NTS sqrt( distance2(p1, p2) );
|
||||
return CGAL::sqrt( distance2(p1, p2) );
|
||||
}
|
||||
|
||||
void compute_origin()
|
||||
{
|
||||
FT dx = f2.x() - f1.x();
|
||||
FT dy = f2.y() - f1.y();
|
||||
FT a = CGAL_NTS sqrt(CGAL_NTS square(dx) + CGAL_NTS square(dy));
|
||||
FT a = CGAL::sqrt(CGAL::square(dx) + CGAL::square(dy));
|
||||
FT t = (FT(1) + r / a) / FT(2);
|
||||
|
||||
o = Point_2(dx * t + f1.x(), dy * t + f1.y());
|
||||
|
|
@ -123,17 +123,17 @@ protected:
|
|||
|
||||
std::vector< Point_2 > p;
|
||||
|
||||
if ( CGAL_NTS is_negative(d) ) return p;
|
||||
if ( CGAL::is_negative(d) ) return p;
|
||||
|
||||
if ( CGAL_NTS is_zero(df.x()) ) {
|
||||
if ( CGAL::is_zero(df.x()) ) {
|
||||
FT y = (d1 - d2 + norm2(f2) - norm2(f1)) / (FT(2) * df.y());
|
||||
|
||||
FT D = d1 - CGAL_NTS square(y - f1.y());
|
||||
FT D = d1 - CGAL::square(y - f1.y());
|
||||
|
||||
D = CGAL_NTS abs(D);
|
||||
D = CGAL::abs(D);
|
||||
|
||||
FT x1 = CGAL_NTS sqrt(D) + f1.x();
|
||||
FT x2 = -CGAL_NTS sqrt(D) + f1.x();
|
||||
FT x1 = CGAL::sqrt(D) + f1.x();
|
||||
FT x2 = -CGAL::sqrt(D) + f1.x();
|
||||
|
||||
p.push_back(Point_2(x1, y));
|
||||
p.push_back(Point_2(x2, y));
|
||||
|
|
@ -145,16 +145,16 @@ protected:
|
|||
FT gamma1 = gamma - f1.x();
|
||||
FT beta = df.y() / df.x();
|
||||
|
||||
FT a = FT(1) + CGAL_NTS square(beta);
|
||||
FT a = FT(1) + CGAL::square(beta);
|
||||
FT b = -FT(2) * (gamma1 * beta + f1.y());
|
||||
FT c = CGAL_NTS square(f1.y()) + CGAL_NTS square(gamma1) - d1;
|
||||
FT c = CGAL::square(f1.y()) + CGAL::square(gamma1) - d1;
|
||||
|
||||
FT D = CGAL_NTS square(b) - FT(4) * a * c;
|
||||
FT D = CGAL::square(b) - FT(4) * a * c;
|
||||
|
||||
D = CGAL_NTS abs(D);
|
||||
D = CGAL::abs(D);
|
||||
|
||||
FT y1 = (-b + CGAL_NTS sqrt(D)) / (FT(2) * a);
|
||||
FT y2 = (-b - CGAL_NTS sqrt(D)) / (FT(2) * a);
|
||||
FT y1 = (-b + CGAL::sqrt(D)) / (FT(2) * a);
|
||||
FT y2 = (-b - CGAL::sqrt(D)) / (FT(2) * a);
|
||||
|
||||
FT x1 = gamma - beta * y1;
|
||||
FT x2 = gamma - beta * y2;
|
||||
|
|
@ -167,10 +167,10 @@ protected:
|
|||
|
||||
bool right(const Point_2& p) const
|
||||
{
|
||||
return CGAL_NTS
|
||||
is_negative( det3x3_by_formula< FT >(f1.x(), f1.y(), 1,
|
||||
f2.x(), f2.y(), 1,
|
||||
p.x(), p.y(), 1) );
|
||||
return
|
||||
CGAL::is_negative( det3x3_by_formula<FT>(f1.x(), f1.y(), 1,
|
||||
f2.x(), f2.y(), 1,
|
||||
p.x(), p.y(), 1) );
|
||||
}
|
||||
|
||||
inline
|
||||
|
|
@ -185,7 +185,7 @@ protected:
|
|||
inline
|
||||
Point_2 f(FT t) const
|
||||
{
|
||||
if ( CGAL_NTS is_negative(t) ) return rchain(-t);
|
||||
if ( CGAL::is_negative(t) ) return rchain(-t);
|
||||
return lchain(t);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public:
|
|||
#if defined CGAL_QT_WIDGET_H
|
||||
void draw_qt(Qt_widget& s)
|
||||
{
|
||||
if ( CGAL_NTS is_zero(r) ) {
|
||||
if ( CGAL::is_zero(r) ) {
|
||||
draw_ray(s);
|
||||
return;
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ public:
|
|||
inline
|
||||
void draw(Stream& s) const
|
||||
{
|
||||
if ( CGAL_NTS is_zero(this->r) ) {
|
||||
if ( CGAL::is_zero(this->r) ) {
|
||||
draw_ray(s);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public:
|
|||
|
||||
void generate_points(std::vector<Point_2>& p) const
|
||||
{
|
||||
if ( CGAL_NTS is_zero(this->r) ) {
|
||||
if ( CGAL::is_zero(this->r) ) {
|
||||
p.push_back(p1);
|
||||
p.push_back(p2);
|
||||
return;
|
||||
|
|
@ -109,7 +109,7 @@ public:
|
|||
s[0] = t(p1);
|
||||
s[1] = t(p2);
|
||||
|
||||
if (CGAL_NTS compare(s[0], s[1]) == LARGER) {
|
||||
if (CGAL::compare(s[0], s[1]) == LARGER) {
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
FT tmp = s[0];
|
||||
s[0] = s[1];
|
||||
|
|
@ -121,15 +121,15 @@ public:
|
|||
|
||||
p.clear();
|
||||
|
||||
if ( !(CGAL_NTS is_positive(s[0])) &&
|
||||
!(CGAL_NTS is_negative(s[1])) ) {
|
||||
if ( !(CGAL::is_positive(s[0])) &&
|
||||
!(CGAL::is_negative(s[1])) ) {
|
||||
FT tt;
|
||||
int k;
|
||||
|
||||
p.push_back( this->o );
|
||||
k = 1;
|
||||
tt = FT(-STEP);
|
||||
while ( CGAL_NTS compare(tt, s[0]) == LARGER ) {
|
||||
while ( CGAL::compare(tt, s[0]) == LARGER ) {
|
||||
p.insert( p.begin(), f(tt) );
|
||||
k--;
|
||||
tt = -FT(k * k) * this->STEP;
|
||||
|
|
@ -138,14 +138,14 @@ public:
|
|||
|
||||
k = 1;
|
||||
tt = FT(this->STEP);
|
||||
while ( CGAL_NTS compare(tt, s[1]) == SMALLER ) {
|
||||
while ( CGAL::compare(tt, s[1]) == SMALLER ) {
|
||||
p.push_back( f(tt) );
|
||||
k++;
|
||||
tt = FT(k * k) * this->STEP;
|
||||
}
|
||||
p.push_back( f(s[1]) );
|
||||
} else if ( !(CGAL_NTS is_negative(s[0])) &&
|
||||
!(CGAL_NTS is_negative(s[1])) ) {
|
||||
} else if ( !(CGAL::is_negative(s[0])) &&
|
||||
!(CGAL::is_negative(s[1])) ) {
|
||||
FT tt;
|
||||
int k;
|
||||
|
||||
|
|
@ -153,10 +153,10 @@ public:
|
|||
p.push_back( f(s[0]) );
|
||||
|
||||
tt = s[0];
|
||||
k = int(CGAL_NTS to_double(CGAL_NTS sqrt(tt / this->STEP)));
|
||||
k = int(CGAL::to_double(CGAL::sqrt(tt / this->STEP)));
|
||||
|
||||
while ( CGAL_NTS compare(tt, s[1]) == SMALLER ) {
|
||||
if ( CGAL_NTS compare(tt, s[0]) != SMALLER )
|
||||
while ( CGAL::compare(tt, s[1]) == SMALLER ) {
|
||||
if ( CGAL::compare(tt, s[0]) != SMALLER )
|
||||
p.push_back( f(tt) );
|
||||
k++;
|
||||
tt = FT(k * k) * this->STEP;
|
||||
|
|
@ -169,10 +169,10 @@ public:
|
|||
p.push_back( f(s[1]) );
|
||||
|
||||
tt = s[1];
|
||||
k = int(CGAL_NTS to_double(-CGAL_NTS sqrt(-tt / this->STEP)));
|
||||
k = int(CGAL::to_double(-CGAL::sqrt(-tt / this->STEP)));
|
||||
|
||||
while ( CGAL_NTS compare(tt, s[0]) == LARGER ) {
|
||||
if ( CGAL_NTS compare(tt, s[1]) != LARGER )
|
||||
while ( CGAL::compare(tt, s[0]) == LARGER ) {
|
||||
if ( CGAL::compare(tt, s[1]) != LARGER )
|
||||
p.push_back( f(tt) );
|
||||
k--;
|
||||
tt = -FT(k * k) * this->STEP;
|
||||
|
|
|
|||
|
|
@ -76,14 +76,14 @@ protected:
|
|||
inline static
|
||||
FT distance(const Point_2& p1, const Point_2& p2)
|
||||
{
|
||||
return CGAL_NTS sqrt( distance2(p1, p2) );
|
||||
return CGAL::sqrt( distance2(p1, p2) );
|
||||
}
|
||||
|
||||
inline static
|
||||
FT distance(const Point_2& p, const Line_2& l)
|
||||
{
|
||||
return ( p.x() * l.a() + p.y() * l.b() + l.c() ) /
|
||||
CGAL_NTS sqrt( square(l.a()) + square(l.b()) );
|
||||
CGAL::sqrt( square(l.a()) + square(l.b()) );
|
||||
}
|
||||
|
||||
// instance stuff
|
||||
|
|
@ -118,17 +118,17 @@ protected:
|
|||
std::vector< Point_2 > p;
|
||||
|
||||
if ( l.a() == ZERO ) {
|
||||
FT y = d2 * CGAL_NTS sign(l.b()) - l.c() / l.b();
|
||||
FT y = d2 * CGAL::sign(l.b()) - l.c() / l.b();
|
||||
|
||||
FT C = CGAL_NTS square(y) - FT(2) * c.y() * y +
|
||||
FT C = CGAL::square(y) - FT(2) * c.y() * y +
|
||||
square(c.x()) + square(c.y()) - d1;
|
||||
|
||||
FT D = square(c.x()) - C;
|
||||
|
||||
D = CGAL_NTS abs(D);
|
||||
D = CGAL::abs(D);
|
||||
|
||||
FT x1 = CGAL_NTS sqrt(D) + c.x();
|
||||
FT x2 = -CGAL_NTS sqrt(D) + c.x();
|
||||
FT x1 = CGAL::sqrt(D) + c.x();
|
||||
FT x2 = -CGAL::sqrt(D) + c.x();
|
||||
|
||||
p.push_back(Point_2(x1, y));
|
||||
p.push_back(Point_2(x2, y));
|
||||
|
|
@ -136,22 +136,22 @@ protected:
|
|||
return p;
|
||||
}
|
||||
|
||||
FT A = d2 * CGAL_NTS sqrt( CGAL_NTS square(l.a()) +
|
||||
CGAL_NTS square(l.b()) ) - l.c();
|
||||
FT B = CGAL_NTS square(c.x()) + CGAL_NTS square(c.y()) - d1;
|
||||
FT A = d2 * CGAL::sqrt( CGAL::square(l.a()) +
|
||||
CGAL::square(l.b()) ) - l.c();
|
||||
FT B = CGAL::square(c.x()) + CGAL::square(c.y()) - d1;
|
||||
|
||||
FT alpha = FT(1) + CGAL_NTS square(l.b() / l.a());
|
||||
FT beta = A * l.b() / CGAL_NTS square(l.a()) + c.y()
|
||||
FT alpha = FT(1) + CGAL::square(l.b() / l.a());
|
||||
FT beta = A * l.b() / CGAL::square(l.a()) + c.y()
|
||||
- c.x() * l.b() / l.a();
|
||||
FT gamma = CGAL_NTS square(A / l.a()) + B
|
||||
FT gamma = CGAL::square(A / l.a()) + B
|
||||
- FT(2) * c.x() * A / l.a();
|
||||
|
||||
FT D = CGAL_NTS square(beta) - alpha * gamma;
|
||||
FT D = CGAL::square(beta) - alpha * gamma;
|
||||
|
||||
D = CGAL_NTS abs(D);
|
||||
D = CGAL::abs(D);
|
||||
|
||||
FT y1 = (beta + CGAL_NTS sqrt(D)) / alpha;
|
||||
FT y2 = (beta - CGAL_NTS sqrt(D)) / alpha;
|
||||
FT y1 = (beta + CGAL::sqrt(D)) / alpha;
|
||||
FT y2 = (beta - CGAL::sqrt(D)) / alpha;
|
||||
|
||||
FT x1 = (A - l.b() * y1) / l.a();
|
||||
FT x2 = (A - l.b() * y2) / l.a();
|
||||
|
|
@ -164,10 +164,10 @@ protected:
|
|||
|
||||
bool right(const Point_2& p) const
|
||||
{
|
||||
return CGAL_NTS
|
||||
is_positive( det3x3_by_formula< FT >(c.x(), c.y(), FT(1),
|
||||
o.x(), o.y(), FT(1),
|
||||
p.x(), p.y(), FT(1)) );
|
||||
return
|
||||
CGAL::is_positive( det3x3_by_formula<FT>(c.x(), c.y(), FT(1),
|
||||
o.x(), o.y(), FT(1),
|
||||
p.x(), p.y(), FT(1)) );
|
||||
}
|
||||
|
||||
inline
|
||||
|
|
@ -182,7 +182,7 @@ protected:
|
|||
inline
|
||||
Point_2 f(FT t) const
|
||||
{
|
||||
if ( CGAL_NTS is_negative(t) ) return rchain(-t);
|
||||
if ( CGAL::is_negative(t) ) return rchain(-t);
|
||||
return lchain(t);
|
||||
}
|
||||
|
||||
|
|
@ -209,10 +209,9 @@ public:
|
|||
{
|
||||
this->c = p.point();
|
||||
|
||||
FT d_a = CGAL_NTS to_double(l1.a());
|
||||
FT d_b = CGAL_NTS to_double(l1.b());
|
||||
FT len = CGAL_NTS sqrt(CGAL_NTS square(d_a) +
|
||||
CGAL_NTS square(d_b));
|
||||
FT d_a = CGAL::to_double(l1.a());
|
||||
FT d_b = CGAL::to_double(l1.b());
|
||||
FT len = CGAL::sqrt(CGAL::square(d_a) + CGAL::square(d_b));
|
||||
|
||||
FT r = p.weight() * len;
|
||||
|
||||
|
|
@ -236,8 +235,7 @@ public:
|
|||
Oriented_side
|
||||
side_of_parabola(const Point_2& p) const
|
||||
{
|
||||
Point_2 q(CGAL_NTS to_double(p.x()),
|
||||
CGAL_NTS to_double(p.y()));
|
||||
Point_2 q(CGAL::to_double(p.x()), CGAL::to_double(p.y()));
|
||||
|
||||
FT d = distance(q, c) - fabs(distance(q, l));
|
||||
if ( d < 0 ) return ON_NEGATIVE_SIDE;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
s[0] = t(p1);
|
||||
s[1] = t(p2);
|
||||
|
||||
if (CGAL_NTS compare(s[0], s[1]) == LARGER) {
|
||||
if (CGAL::compare(s[0], s[1]) == LARGER) {
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
FT tmp = s[0];
|
||||
s[0] = s[1];
|
||||
|
|
@ -87,15 +87,15 @@ public:
|
|||
|
||||
p.clear();
|
||||
|
||||
if ( !(CGAL_NTS is_positive(s[0])) &&
|
||||
!(CGAL_NTS is_negative(s[1])) ) {
|
||||
if ( !(CGAL::is_positive(s[0])) &&
|
||||
!(CGAL::is_negative(s[1])) ) {
|
||||
FT tt;
|
||||
int k;
|
||||
|
||||
p.push_back( this->o );
|
||||
k = 1;
|
||||
tt = -this->STEP;
|
||||
while ( CGAL_NTS compare(tt, s[0]) == LARGER ) {
|
||||
while ( CGAL::compare(tt, s[0]) == LARGER ) {
|
||||
p.insert( p.begin(), f(tt) );
|
||||
k--;
|
||||
tt = -FT(k * k) * this->STEP;
|
||||
|
|
@ -104,14 +104,14 @@ public:
|
|||
|
||||
k = 1;
|
||||
tt = this->STEP;
|
||||
while ( CGAL_NTS compare(tt, s[1]) == SMALLER ) {
|
||||
while ( CGAL::compare(tt, s[1]) == SMALLER ) {
|
||||
p.push_back( f(tt) );
|
||||
k++;
|
||||
tt = FT(k * k) * this->STEP;
|
||||
}
|
||||
p.push_back( f(s[1]) );
|
||||
} else if ( !(CGAL_NTS is_negative(s[0])) &&
|
||||
!(CGAL_NTS is_negative(s[1])) ) {
|
||||
} else if ( !(CGAL::is_negative(s[0])) &&
|
||||
!(CGAL::is_negative(s[1])) ) {
|
||||
FT tt;
|
||||
int k;
|
||||
|
||||
|
|
@ -119,10 +119,10 @@ public:
|
|||
p.push_back( f(s[0]) );
|
||||
|
||||
tt = s[0];
|
||||
k = int(CGAL_NTS to_double(CGAL_NTS sqrt(tt / this->STEP)));
|
||||
k = int(CGAL::to_double(CGAL::sqrt(tt / this->STEP)));
|
||||
|
||||
while ( CGAL_NTS compare(tt, s[1]) == SMALLER ) {
|
||||
if ( CGAL_NTS compare(tt, s[0]) != SMALLER )
|
||||
while ( CGAL::compare(tt, s[1]) == SMALLER ) {
|
||||
if ( CGAL::compare(tt, s[0]) != SMALLER )
|
||||
p.push_back( f(tt) );
|
||||
k++;
|
||||
tt = FT(k * k) * this->STEP;
|
||||
|
|
@ -135,10 +135,10 @@ public:
|
|||
p.push_back( f(s[1]) );
|
||||
|
||||
tt = s[1];
|
||||
k = int(CGAL_NTS to_double(-CGAL_NTS sqrt(-tt / this->STEP)));
|
||||
k = int(CGAL::to_double(-CGAL::sqrt(-tt / this->STEP)));
|
||||
|
||||
while ( CGAL_NTS compare(tt, s[0]) == LARGER ) {
|
||||
if ( CGAL_NTS compare(tt, s[1]) != LARGER )
|
||||
while ( CGAL::compare(tt, s[0]) == LARGER ) {
|
||||
if ( CGAL::compare(tt, s[1]) != LARGER )
|
||||
p.push_back( f(tt) );
|
||||
k--;
|
||||
tt = -FT(k * k) * this->STEP;
|
||||
|
|
|
|||
|
|
@ -47,17 +47,17 @@ sign_a_plus_b_x_sqrt_c(const RT &a, const RT &b, const RT &c)
|
|||
{
|
||||
// computes the sign of quantity: a + b * sqrt(c)
|
||||
|
||||
CGAL_assertion( !(CGAL_NTS is_negative(c)) );
|
||||
CGAL_assertion( !(CGAL::is_negative(c)) );
|
||||
|
||||
Sign sa = CGAL_NTS sign(a);
|
||||
if ( CGAL_NTS sign(c) == ZERO ) return sa;
|
||||
Sign sa = CGAL::sign(a);
|
||||
if ( CGAL::sign(c) == ZERO ) return sa;
|
||||
|
||||
Sign sb = CGAL_NTS sign(b);
|
||||
Sign sb = CGAL::sign(b);
|
||||
if ( sa == sb ) return sa;
|
||||
if ( sa == ZERO ) return sb;
|
||||
|
||||
return Sign( sa * CGAL_NTS compare( CGAL_NTS square(a),
|
||||
c * CGAL_NTS square(b) )
|
||||
return Sign( sa * CGAL::compare( CGAL::square(a),
|
||||
c * CGAL::square(b) )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -68,19 +68,19 @@ sign_a_x_sqrt_c_plus_b_x_sqrt_d(const RT &a, const RT &b,
|
|||
{
|
||||
// computes the sign of quantity: a * sqrt(c) + b * sqrt(d)
|
||||
|
||||
CGAL_assertion( !(CGAL_NTS is_negative(c)) );
|
||||
CGAL_assertion( !(CGAL_NTS is_negative(d)) );
|
||||
CGAL_assertion( !(CGAL::is_negative(c)) );
|
||||
CGAL_assertion( !(CGAL::is_negative(d)) );
|
||||
|
||||
Sign sb = CGAL_NTS sign(b);
|
||||
if ( CGAL_NTS sign(d) == ZERO ) return CGAL_NTS sign(a * c);
|
||||
if ( CGAL_NTS sign(c) == ZERO ) return sb;
|
||||
Sign sb = CGAL::sign(b);
|
||||
if ( CGAL::sign(d) == ZERO ) return CGAL::sign(a * c);
|
||||
if ( CGAL::sign(c) == ZERO ) return sb;
|
||||
|
||||
Sign sa = CGAL_NTS sign(a);
|
||||
Sign sa = CGAL::sign(a);
|
||||
if ( sa == sb ) return sa;
|
||||
if ( sa == ZERO ) return sb;
|
||||
|
||||
return Sign( sa * CGAL_NTS compare( CGAL_NTS square(a) * c,
|
||||
CGAL_NTS square(b) * d )
|
||||
return Sign( sa * CGAL::compare( CGAL::square(a) * c,
|
||||
CGAL::square(b) * d )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -92,19 +92,19 @@ sign_a_plus_b_x_sqrt_e_plus_c_x_sqrt_f(const RT &a, const RT &b,
|
|||
{
|
||||
// computes the sign of quantity: a + b * sqrt(e) + c * sqrt(f)
|
||||
|
||||
CGAL_assertion( !(CGAL_NTS is_negative(e)) );
|
||||
CGAL_assertion( !(CGAL_NTS is_negative(f)) );
|
||||
CGAL_assertion( !(CGAL::is_negative(e)) );
|
||||
CGAL_assertion( !(CGAL::is_negative(f)) );
|
||||
|
||||
Sign s_a_plus_b_x_sqrt_e = sign_a_plus_b_x_sqrt_c(a, b, e);
|
||||
if ( CGAL_NTS sign(f) == ZERO ) return s_a_plus_b_x_sqrt_e;
|
||||
if ( CGAL::sign(f) == ZERO ) return s_a_plus_b_x_sqrt_e;
|
||||
|
||||
Sign sc = CGAL_NTS sign(c);
|
||||
Sign sc = CGAL::sign(c);
|
||||
if ( s_a_plus_b_x_sqrt_e == sc ) return sc;
|
||||
if ( s_a_plus_b_x_sqrt_e == ZERO ) return sc;
|
||||
|
||||
return s_a_plus_b_x_sqrt_e *
|
||||
sign_a_plus_b_x_sqrt_c(CGAL_NTS square(a) + CGAL_NTS square(b) * e
|
||||
- CGAL_NTS square(c) * f,
|
||||
sign_a_plus_b_x_sqrt_c(CGAL::square(a) + CGAL::square(b) * e
|
||||
- CGAL::square(c) * f,
|
||||
RT(2) * a * b, e);
|
||||
}
|
||||
|
||||
|
|
@ -120,8 +120,8 @@ sign_a_plus_b_x_sqrt_e_plus_c_x_sqrt_f_plus_d_sqrt_e_x_f(const RT &a,
|
|||
// computes the sign of quantity:
|
||||
// a + b * sqrt(e) + c * sqrt(f) + d * sqrt(e * f)
|
||||
|
||||
CGAL_assertion( !(CGAL_NTS is_negative(e)) );
|
||||
CGAL_assertion( !(CGAL_NTS is_negative(f)) );
|
||||
CGAL_assertion( !(CGAL::is_negative(e)) );
|
||||
CGAL_assertion( !(CGAL::is_negative(f)) );
|
||||
|
||||
Sign s_a_plus_b_sqrt_e = sign_a_plus_b_x_sqrt_c(a, b, e);
|
||||
Sign s_c_plus_d_sqrt_e = sign_a_plus_b_x_sqrt_c(c, d, e);
|
||||
|
|
@ -133,9 +133,9 @@ sign_a_plus_b_x_sqrt_e_plus_c_x_sqrt_f_plus_d_sqrt_e_x_f(const RT &a,
|
|||
return s_a_plus_b_sqrt_e;
|
||||
|
||||
return s_a_plus_b_sqrt_e *
|
||||
sign_a_plus_b_x_sqrt_c(CGAL_NTS square(a) + CGAL_NTS square(b) * e
|
||||
- CGAL_NTS square(c) * f
|
||||
- CGAL_NTS square(d) * e * f,
|
||||
sign_a_plus_b_x_sqrt_c(CGAL::square(a) + CGAL::square(b) * e
|
||||
- CGAL::square(c) * f
|
||||
- CGAL::square(d) * e * f,
|
||||
RT(2) * (a * b - c * d * f),
|
||||
e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,13 +52,11 @@ ad_is_hidden_test_ring_C2(const RT &x1, const RT &y1, const RT &w1,
|
|||
#endif
|
||||
must_be_filtered(x1);
|
||||
|
||||
Sign s = CGAL_NTS sign(
|
||||
CGAL_NTS square(x1 - x2)
|
||||
+ CGAL_NTS square(y1 - y2)
|
||||
- CGAL_NTS square(w1 - w2)
|
||||
);
|
||||
Sign s = CGAL::sign( CGAL::square(x1 - x2) + CGAL::square(y1 - y2)
|
||||
- CGAL::square(w1 - w2)
|
||||
);
|
||||
if ( s == POSITIVE ) { return false; }
|
||||
return (CGAL_NTS compare(w1, w2) != SMALLER);
|
||||
return (CGAL::compare(w1, w2) != SMALLER);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -71,9 +69,8 @@ ad_is_hidden_test_sqrtf_C2(const RT &x1, const RT &y1, const RT &w1,
|
|||
#ifdef AG2_PROFILE_PREDICATES
|
||||
ag2_predicate_profiler::is_trivial_counter++;
|
||||
#endif
|
||||
RT d = CGAL_NTS sqrt(CGAL_NTS square(x1 - x2)
|
||||
+ CGAL_NTS square(y1 - y2));
|
||||
Sign s = CGAL_NTS sign(d - w1 + w2);
|
||||
RT d = CGAL::sqrt(CGAL::square(x1 - x2) + CGAL::square(y1 - y2));
|
||||
Sign s = CGAL::sign(d - w1 + w2);
|
||||
|
||||
return ( s != POSITIVE );
|
||||
}
|
||||
|
|
@ -96,12 +93,12 @@ compare_ad_distances_test_ring_C2(const RT &x1, const RT &y1, const RT &w1,
|
|||
|
||||
// this function compares the distances of the point(x, y) from the
|
||||
// disks {(x1, y1), w1} and {(x2, y2), w2}
|
||||
RT D1 = CGAL_NTS square(x1 - x) + CGAL_NTS square(y1 - y);
|
||||
RT D2 = CGAL_NTS square(x2 - x) + CGAL_NTS square(y2 - y);
|
||||
RT D1 = CGAL::square(x1 - x) + CGAL::square(y1 - y);
|
||||
RT D2 = CGAL::square(x2 - x) + CGAL::square(y2 - y);
|
||||
RT Dw = w2 - w1;
|
||||
|
||||
Sign sign_of_Dw = CGAL_NTS sign(Dw);
|
||||
Comparison_result R = CGAL_NTS compare(D1, D2);
|
||||
Sign sign_of_Dw = CGAL::sign(Dw);
|
||||
Comparison_result R = CGAL::compare(D1, D2);
|
||||
|
||||
if ( sign_of_Dw == ZERO ) {
|
||||
return R;
|
||||
|
|
@ -109,13 +106,13 @@ compare_ad_distances_test_ring_C2(const RT &x1, const RT &y1, const RT &w1,
|
|||
if ( sign_of_Dw == POSITIVE ) {
|
||||
if ( R != SMALLER ) return LARGER;
|
||||
|
||||
Sign s = sign_a_plus_b_x_sqrt_c(D1 - D2 + CGAL_NTS square(Dw),
|
||||
Sign s = sign_a_plus_b_x_sqrt_c(D1 - D2 + CGAL::square(Dw),
|
||||
RT(2) * Dw, D1);
|
||||
return ((s == POSITIVE) ? LARGER : ((s == ZERO) ? EQUAL : SMALLER));
|
||||
}
|
||||
|
||||
if ( R != LARGER ) return SMALLER;
|
||||
Sign s = sign_a_plus_b_x_sqrt_c(D1 - D2 - CGAL_NTS square(Dw),
|
||||
Sign s = sign_a_plus_b_x_sqrt_c(D1 - D2 - CGAL::square(Dw),
|
||||
RT(2) * Dw, D2);
|
||||
|
||||
return ((s == POSITIVE) ? LARGER : ((s == ZERO) ? EQUAL : SMALLER));
|
||||
|
|
@ -137,13 +134,13 @@ compare_ad_distances_test_sqrtf_C2(const RT &x1, const RT &y1, const RT &w1,
|
|||
// this function compares the distances of the point(x, y) from the
|
||||
// disks {(x1, y1), w1} and {(x2, y2), w2}
|
||||
|
||||
RT D1 = CGAL_NTS square(x1 - x) + CGAL_NTS square(y1 - y);
|
||||
RT D2 = CGAL_NTS square(x2 - x) + CGAL_NTS square(y2 - y);
|
||||
RT D1 = CGAL::square(x1 - x) + CGAL::square(y1 - y);
|
||||
RT D2 = CGAL::square(x2 - x) + CGAL::square(y2 - y);
|
||||
|
||||
RT d1 = CGAL_NTS sqrt(D1) - w1;
|
||||
RT d2 = CGAL_NTS sqrt(D2) - w2;
|
||||
RT d1 = CGAL::sqrt(D1) - w1;
|
||||
RT d2 = CGAL::sqrt(D2) - w2;
|
||||
|
||||
return CGAL_NTS compare(d1, d2);
|
||||
return CGAL::compare(d1, d2);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -164,17 +161,17 @@ bounded_side_of_segment(const RT& x1, const RT& y1,
|
|||
|
||||
CGAL_precondition( sign_of_determinant2x2(x1-x,y1-y,x2-x,y2-y) == ZERO );
|
||||
|
||||
Comparison_result rx1 = CGAL_NTS compare(x, x1);
|
||||
Comparison_result ry1 = CGAL_NTS compare(y, y1);
|
||||
Comparison_result rx1 = CGAL::compare(x, x1);
|
||||
Comparison_result ry1 = CGAL::compare(y, y1);
|
||||
|
||||
if ( rx1 == EQUAL && ry1 == EQUAL ) { return ON_BOUNDARY; }
|
||||
|
||||
Comparison_result rx2 = CGAL_NTS compare(x, x2);
|
||||
Comparison_result ry2 = CGAL_NTS compare(y, y2);
|
||||
Comparison_result rx2 = CGAL::compare(x, x2);
|
||||
Comparison_result ry2 = CGAL::compare(y, y2);
|
||||
|
||||
if ( rx2 == EQUAL && ry2 == EQUAL ) { return ON_BOUNDARY; }
|
||||
|
||||
Comparison_result rx12 = CGAL_NTS compare(x1, x2);
|
||||
Comparison_result rx12 = CGAL::compare(x1, x2);
|
||||
|
||||
if ( rx12 == SMALLER ) {
|
||||
CGAL_assertion( rx1 != EQUAL && rx2 != EQUAL );
|
||||
|
|
@ -186,7 +183,7 @@ bounded_side_of_segment(const RT& x1, const RT& y1,
|
|||
ON_UNBOUNDED_SIDE;
|
||||
}
|
||||
|
||||
Comparison_result ry12 = CGAL_NTS compare(y1, y2);
|
||||
Comparison_result ry12 = CGAL::compare(y1, y2);
|
||||
CGAL_assertion( ry12 != EQUAL );
|
||||
CGAL_assertion( ry1 != EQUAL && ry2 != EQUAL );
|
||||
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ public:
|
|||
FT xs = wp.x() - _pole.x();
|
||||
FT ys = wp.y() - _pole.y();
|
||||
FT ws = wp.weight() - _pole.weight();
|
||||
FT ps = CGAL_NTS square(xs) + CGAL_NTS square(ys)
|
||||
- CGAL_NTS square(ws);
|
||||
FT ps = CGAL::square(xs) + CGAL::square(ys)
|
||||
- CGAL::square(ws);
|
||||
|
||||
return
|
||||
Inverted_weighted_point(Site_2(Point_2(xs, ys), ws), ps);
|
||||
|
|
@ -109,11 +109,11 @@ public:
|
|||
FT dxw = det2x2_by_formula(u1.x(), u1.weight(), u2.x(), u2.weight());
|
||||
FT dyw = det2x2_by_formula(u1.y(), u1.weight(), u2.y(), u2.weight());
|
||||
|
||||
_a = CGAL_NTS square(dxp) + CGAL_NTS square(dyp);
|
||||
_a = CGAL::square(dxp) + CGAL::square(dyp);
|
||||
_b = dxp * dxw + dyp * dyw;
|
||||
_c = CGAL_NTS square(dxw) + CGAL_NTS square(dyw) - CGAL_NTS square(dxy);
|
||||
_c = CGAL::square(dxw) + CGAL::square(dyw) - CGAL::square(dxy);
|
||||
_c2 = dxy;
|
||||
_delta = _a - CGAL_NTS square(dwp);
|
||||
_delta = _a - CGAL::square(dwp);
|
||||
_dxp = dxp;
|
||||
_dyp = dyp;
|
||||
_dwp = dwp;
|
||||
|
|
@ -132,7 +132,7 @@ public:
|
|||
inline FT dyp() const { return _dyp; }
|
||||
inline FT dwp() const { return _dwp; }
|
||||
|
||||
inline bool is_first_root() const { return CGAL_NTS is_negative(_c2); }
|
||||
inline bool is_first_root() const { return CGAL::is_negative(_c2); }
|
||||
|
||||
Voronoi_radius get_symmetric()
|
||||
{
|
||||
|
|
@ -183,8 +183,8 @@ protected:
|
|||
store(dx, dy, dw);
|
||||
_c1 = dx * dxw + dy * dyw;
|
||||
_c2 = dxy;
|
||||
_d = CGAL_NTS square(dx) + CGAL_NTS square(dy);
|
||||
_delta = _d - CGAL_NTS square(dw);
|
||||
_d = CGAL::square(dx) + CGAL::square(dy);
|
||||
_delta = _d - CGAL::square(dw);
|
||||
_dxw = dxw;
|
||||
_dyw = dyw;
|
||||
}
|
||||
|
|
@ -286,8 +286,8 @@ protected:
|
|||
inline
|
||||
void compute_gamma()
|
||||
{
|
||||
_gamma = CGAL_NTS square(this->_dxw) + CGAL_NTS square(this->_dyw)
|
||||
- CGAL_NTS square(this->_c2);
|
||||
_gamma = CGAL::square(this->_dxw) + CGAL::square(this->_dyw)
|
||||
- CGAL::square(this->_c2);
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
@ -310,7 +310,7 @@ public:
|
|||
inline FT gamma() const { return _gamma; }
|
||||
|
||||
inline bool is_first_root() const {
|
||||
return CGAL_NTS is_negative(this->_c2);
|
||||
return CGAL::is_negative(this->_c2);
|
||||
}
|
||||
|
||||
FT compute_P4(const Inverted_weighted_point& u1,
|
||||
|
|
@ -325,24 +325,24 @@ public:
|
|||
FT dy3 = det2x2_by_formula(u3.y(), u3.p(), u2.y(), u2.p());
|
||||
FT dw3 = det2x2_by_formula(u3.weight(), u3.p(), u2.weight(), u2.p());
|
||||
|
||||
FT u2Pv2 = CGAL_NTS square(u2.x()) + CGAL_NTS square(u2.y());
|
||||
FT u2Mv2 = CGAL_NTS square(u2.x()) - CGAL_NTS square(u2.y());
|
||||
FT u2Pv2 = CGAL::square(u2.x()) + CGAL::square(u2.y());
|
||||
FT u2Mv2 = CGAL::square(u2.x()) - CGAL::square(u2.y());
|
||||
FT u2v2 = FT(2) * u2.x() * u2.y();
|
||||
|
||||
|
||||
FT vvMuu = dy1 * dy3 - dx1 * dx3;
|
||||
FT vuPuv = dy1 * dx3 + dx1 * dy3;
|
||||
|
||||
FT dx2Pdy2_1 = CGAL_NTS square(dx1) + CGAL_NTS square(dy1);
|
||||
FT dx2Pdy2_3 = CGAL_NTS square(dx3) + CGAL_NTS square(dy3);
|
||||
FT dx2Pdy2_1 = CGAL::square(dx1) + CGAL::square(dy1);
|
||||
FT dx2Pdy2_3 = CGAL::square(dx3) + CGAL::square(dy3);
|
||||
|
||||
FT fr1_sq = CGAL_NTS square(dw1) * dx2Pdy2_3;
|
||||
FT fr3_sq = CGAL_NTS square(dw3) * dx2Pdy2_1;
|
||||
FT fr1_sq = CGAL::square(dw1) * dx2Pdy2_3;
|
||||
FT fr3_sq = CGAL::square(dw3) * dx2Pdy2_1;
|
||||
|
||||
FT f1 = (fr1_sq + fr3_sq) * CGAL_NTS square(u2Pv2);
|
||||
FT f1 = (fr1_sq + fr3_sq) * CGAL::square(u2Pv2);
|
||||
|
||||
FT f2 = FT(2) * dw1 * dw3 * u2Pv2 * (u2Mv2 * vvMuu - u2v2 * vuPuv );
|
||||
FT f3 = CGAL_NTS square(u2Mv2 * vuPuv + u2v2 * vvMuu);
|
||||
FT f3 = CGAL::square(u2Mv2 * vuPuv + u2v2 * vvMuu);
|
||||
|
||||
FT F = f1 + f2 - f3;
|
||||
|
||||
|
|
@ -351,7 +351,7 @@ public:
|
|||
FT vuMuv = dy1 * dx3 - dx1 * dy3;
|
||||
|
||||
FT G = fr1_sq + fr3_sq - FT(2) * dw1 * dw3 * uuPvv
|
||||
- CGAL_NTS square(vuMuv);
|
||||
- CGAL::square(vuMuv);
|
||||
|
||||
return (F * G);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ public:
|
|||
inline
|
||||
Sign operator()(const Voronoi_radius& vr, Sqrt_field_tag )
|
||||
{
|
||||
FT r = vr.c1() + vr.c2() * CGAL_NTS sqrt(vr.delta());
|
||||
return CGAL_NTS sign(r);
|
||||
FT r = vr.c1() + vr.c2() * CGAL::sqrt(vr.delta());
|
||||
return CGAL::sign(r);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -68,10 +68,10 @@ public:
|
|||
// instead of 5 in this case.
|
||||
// return sign_a_plus_b_x_sqrt_c(vr.c1(), vr.c2(), vr.delta());
|
||||
|
||||
bool is_first_root = CGAL_NTS is_negative(vr.c2());
|
||||
bool is_first_root = CGAL::is_negative(vr.c2());
|
||||
|
||||
Sign s_beta = CGAL_NTS sign(vr.b());
|
||||
Sign s_gamma = CGAL_NTS sign(vr.c());
|
||||
Sign s_beta = CGAL::sign(vr.b());
|
||||
Sign s_gamma = CGAL::sign(vr.c());
|
||||
|
||||
// the existence test
|
||||
Sign sign_of_root;
|
||||
|
|
@ -123,11 +123,11 @@ public:
|
|||
#ifdef AG2_PROFILE_PREDICATES
|
||||
ag2_predicate_profiler::distance_from_bitangent_counter++;
|
||||
#endif
|
||||
FT a = bl.a1() + bl.a2() * CGAL_NTS sqrt(bl.delta());
|
||||
FT b = bl.b1() + bl.b2() * CGAL_NTS sqrt(bl.delta());
|
||||
FT c = bl.c1() + bl.c2() * CGAL_NTS sqrt(bl.delta());
|
||||
FT a = bl.a1() + bl.a2() * CGAL::sqrt(bl.delta());
|
||||
FT b = bl.b1() + bl.b2() * CGAL::sqrt(bl.delta());
|
||||
FT c = bl.c1() + bl.c2() * CGAL::sqrt(bl.delta());
|
||||
FT r = a * q.x() + b * q.y() + c - q.weight() * bl.d();
|
||||
return CGAL_NTS sign(r);
|
||||
return CGAL::sign(r);
|
||||
}
|
||||
|
||||
Sign
|
||||
|
|
@ -159,11 +159,11 @@ public:
|
|||
operator()(const Bitangent_line& bl,
|
||||
const Inverted_weighted_point& v, Sqrt_field_tag)
|
||||
{
|
||||
FT a = bl.a1() + bl.a2() * CGAL_NTS sqrt(bl.delta());
|
||||
FT b = bl.b1() + bl.b2() * CGAL_NTS sqrt(bl.delta());
|
||||
FT c = bl.c1() + bl.c2() * CGAL_NTS sqrt(bl.delta());
|
||||
FT a = bl.a1() + bl.a2() * CGAL::sqrt(bl.delta());
|
||||
FT b = bl.b1() + bl.b2() * CGAL::sqrt(bl.delta());
|
||||
FT c = bl.c1() + bl.c2() * CGAL::sqrt(bl.delta());
|
||||
FT r = a * v.x() + b * v.y() + c * v.p() - v.weight() * bl.d();
|
||||
return CGAL_NTS sign(r);
|
||||
return CGAL::sign(r);
|
||||
}
|
||||
|
||||
Sign
|
||||
|
|
@ -219,8 +219,8 @@ private:
|
|||
{
|
||||
FT A = l.a1() * p.x() + l.b1() * p.y() + l.c1();
|
||||
FT B = l.a2() * p.x() + l.b2() * p.y() + l.c2();
|
||||
FT P = A + B * CGAL_NTS sqrt(l.delta());
|
||||
return CGAL_NTS sign(P);
|
||||
FT P = A + B * CGAL::sqrt(l.delta());
|
||||
return CGAL::sign(P);
|
||||
}
|
||||
|
||||
Orientation
|
||||
|
|
@ -239,8 +239,8 @@ private:
|
|||
{
|
||||
FT A = l.a1() * u.x() / u.p() + l.b1() * u.y() / u.p() + l.c1();
|
||||
FT B = l.a2() * u.x() / u.p() + l.b2() * u.y() / u.p() + l.c2();
|
||||
FT P = A + B * CGAL_NTS sqrt(l.delta());
|
||||
return CGAL_NTS sign(P);
|
||||
FT P = A + B * CGAL::sqrt(l.delta());
|
||||
return CGAL::sign(P);
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
@ -308,10 +308,10 @@ public:
|
|||
operator()(const Voronoi_circle& vc, const Point_2& p1,
|
||||
const Point_2& p2, Sqrt_field_tag)
|
||||
{
|
||||
FT a = vc.a1() + vc.a2() * CGAL_NTS sqrt(vc.delta());
|
||||
FT b = vc.b1() + vc.b2() * CGAL_NTS sqrt(vc.delta());
|
||||
FT a = vc.a1() + vc.a2() * CGAL::sqrt(vc.delta());
|
||||
FT b = vc.b1() + vc.b2() * CGAL::sqrt(vc.delta());
|
||||
FT det = a * (p2.y() - p1.y()) - b * (p2.x() - p1.x());
|
||||
return CGAL_NTS sign(det);
|
||||
return CGAL::sign(det);
|
||||
}
|
||||
|
||||
Orientation
|
||||
|
|
@ -344,8 +344,8 @@ private:
|
|||
{
|
||||
std::pair<FT,FT> factors = factors_of_P4(u, v, du, dv, dr,
|
||||
Du, Dv, Dr);
|
||||
Sign s1 = CGAL_NTS sign(factors.first);
|
||||
Sign s2 = CGAL_NTS sign(factors.second);
|
||||
Sign s1 = CGAL::sign(factors.first);
|
||||
Sign s2 = CGAL::sign(factors.second);
|
||||
return (s1 * s2);
|
||||
}
|
||||
|
||||
|
|
@ -354,17 +354,17 @@ private:
|
|||
const FT& du, const FT& dv, const FT& dr,
|
||||
const FT& Du, const FT& Dv, const FT& Dr)
|
||||
{
|
||||
FT u2 = CGAL_NTS square(u);
|
||||
FT v2 = CGAL_NTS square(v);
|
||||
FT u2 = CGAL::square(u);
|
||||
FT v2 = CGAL::square(v);
|
||||
|
||||
FT du2 = CGAL_NTS square(du);
|
||||
FT Du2 = CGAL_NTS square(Du);
|
||||
FT du2 = CGAL::square(du);
|
||||
FT Du2 = CGAL::square(Du);
|
||||
|
||||
FT dv2 = CGAL_NTS square(dv);
|
||||
FT Dv2 = CGAL_NTS square(Dv);
|
||||
FT dv2 = CGAL::square(dv);
|
||||
FT Dv2 = CGAL::square(Dv);
|
||||
|
||||
FT dr2 = CGAL_NTS square(dr);
|
||||
FT Dr2 = CGAL_NTS square(Dr);
|
||||
FT dr2 = CGAL::square(dr);
|
||||
FT Dr2 = CGAL::square(Dr);
|
||||
|
||||
FT u2_P_v2 = u2 + v2;
|
||||
FT u2_M_v2 = u2 - v2;
|
||||
|
|
@ -383,11 +383,11 @@ private:
|
|||
|
||||
|
||||
FT F1 = du2_P_dv2 * Dr2 + Du2_P_Dv2 * dr2
|
||||
- uU_P_vV * drDr - CGAL_NTS square(uV_M_Uv);
|
||||
- uU_P_vV * drDr - CGAL::square(uV_M_Uv);
|
||||
|
||||
FT F2 = CGAL_NTS square(u2_P_v2) * (du2_P_dv2 * Dr2 + Du2_P_Dv2 * dr2);
|
||||
FT F2 = CGAL::square(u2_P_v2) * (du2_P_dv2 * Dr2 + Du2_P_Dv2 * dr2);
|
||||
F2 -= u2_P_v2 * (u2_M_v2 * uU_M_vV + uv * uV_P_Uv) * drDr;
|
||||
F2 -= CGAL_NTS square(u2_M_v2 * uV_P_Uv - uv * uU_M_vV);
|
||||
F2 -= CGAL::square(u2_M_v2 * uV_P_Uv - uv * uU_M_vV);
|
||||
|
||||
std::pair<FT, FT> factors(F1,F2);
|
||||
return factors;
|
||||
|
|
@ -398,10 +398,10 @@ public:
|
|||
operator()(const Voronoi_circle& vc1, const Voronoi_circle& vc2,
|
||||
Sqrt_field_tag)
|
||||
{
|
||||
FT c1 = (vc1.c1() + vc1.c2() * CGAL_NTS sqrt(vc1.delta())) / vc1.d();
|
||||
FT c2 = (vc2.c1() + vc2.c2() * CGAL_NTS sqrt(vc2.delta())) / vc2.d();
|
||||
FT c1 = (vc1.c1() + vc1.c2() * CGAL::sqrt(vc1.delta())) / vc1.d();
|
||||
FT c2 = (vc2.c1() + vc2.c2() * CGAL::sqrt(vc2.delta())) / vc2.d();
|
||||
|
||||
Comparison_result r = CGAL_NTS compare(c2, c1);
|
||||
Comparison_result r = CGAL::compare(c2, c1);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
@ -432,8 +432,8 @@ public:
|
|||
bool is_first_root1 = vc1.is_first_root();
|
||||
bool is_first_root2 = vc2.is_first_root();
|
||||
|
||||
CGAL_precondition( CGAL_NTS is_positive(vc1.alpha()) );
|
||||
CGAL_precondition( CGAL_NTS is_positive(vc2.alpha()) );
|
||||
CGAL_precondition( CGAL::is_positive(vc1.alpha()) );
|
||||
CGAL_precondition( CGAL::is_positive(vc2.alpha()) );
|
||||
|
||||
Comparison_result r;
|
||||
if ( is_first_root1 && is_first_root2 ) {
|
||||
|
|
@ -475,8 +475,8 @@ public:
|
|||
bool is_first_root1 = vc1.is_first_root();
|
||||
bool is_first_root2 = vc2.is_first_root();
|
||||
|
||||
CGAL_precondition( CGAL_NTS is_positive(vc1.alpha()) );
|
||||
CGAL_precondition( CGAL_NTS is_positive(vc2.alpha()) );
|
||||
CGAL_precondition( CGAL::is_positive(vc1.alpha()) );
|
||||
CGAL_precondition( CGAL::is_positive(vc2.alpha()) );
|
||||
|
||||
Comparison_result r;
|
||||
if ( is_first_root1 && is_first_root2 ) {
|
||||
|
|
@ -928,10 +928,10 @@ public:
|
|||
FT p = bl1.delta();
|
||||
FT P = bl2.delta();
|
||||
|
||||
FT E = E1 * CGAL_NTS sqrt(p) + E2 * CGAL_NTS sqrt(P)
|
||||
+ E3 * CGAL_NTS sqrt(p * P) + E4;
|
||||
FT E = E1 * CGAL::sqrt(p) + E2 * CGAL::sqrt(P)
|
||||
+ E3 * CGAL::sqrt(p * P) + E4;
|
||||
|
||||
return CGAL_NTS sign(E);
|
||||
return CGAL::sign(E);
|
||||
}
|
||||
|
||||
inline
|
||||
|
|
@ -950,10 +950,10 @@ public:
|
|||
FT sigma = a * A + b * B;
|
||||
FT delta = det2x2_by_formula(a, b, A, B);
|
||||
|
||||
Sign sign_sigma = CGAL_NTS sign(sigma);
|
||||
Sign sign_delta = CGAL_NTS sign(delta);
|
||||
Sign sign_r = CGAL_NTS sign(r);
|
||||
Sign sign_R = CGAL_NTS sign(R);
|
||||
Sign sign_sigma = CGAL::sign(sigma);
|
||||
Sign sign_delta = CGAL::sign(delta);
|
||||
Sign sign_r = CGAL::sign(r);
|
||||
Sign sign_R = CGAL::sign(R);
|
||||
|
||||
Sign sign_E1 = opposite(Sign(sign_R * sign_sigma));
|
||||
Sign sign_E2 = Sign(sign_r * sign_sigma);
|
||||
|
|
@ -962,9 +962,9 @@ public:
|
|||
|
||||
Sign sign_E1_plus_E3_P, sign_E4_plus_E2_P;
|
||||
|
||||
// FT d = CGAL_NTS square(a) + CGAL_NTS square(b);
|
||||
FT G = CGAL_NTS square(R) * d;
|
||||
FT delta2 = CGAL_NTS square(delta);
|
||||
// FT d = CGAL::square(a) + CGAL::square(b);
|
||||
FT G = CGAL::square(R) * d;
|
||||
FT delta2 = CGAL::square(delta);
|
||||
|
||||
if ( sign_E3 == ZERO ) {
|
||||
sign_E1_plus_E3_P = sign_E1;
|
||||
|
|
@ -973,7 +973,7 @@ public:
|
|||
sign_E1_plus_E3_P = sign_E3;
|
||||
} else {
|
||||
FT F1 = delta2 - G;
|
||||
sign_E1_plus_E3_P = Sign(sign_E3 * CGAL_NTS sign(F1));
|
||||
sign_E1_plus_E3_P = Sign(sign_E3 * CGAL::sign(F1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -983,11 +983,11 @@ public:
|
|||
if ( sign_E2 == sign_E4 ) {
|
||||
sign_E4_plus_E2_P = sign_E2;
|
||||
} else {
|
||||
FT F2 = CGAL_NTS square(sigma) - G;
|
||||
FT F2 = CGAL::square(sigma) - G;
|
||||
if ( sign_r == ZERO ) {
|
||||
sign_E4_plus_E2_P = ZERO;
|
||||
} else {
|
||||
sign_E4_plus_E2_P = Sign(sign_E2 * CGAL_NTS sign(F2));
|
||||
sign_E4_plus_E2_P = Sign(sign_E2 * CGAL::sign(F2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -999,13 +999,13 @@ public:
|
|||
|
||||
Sign sign_E5 = opposite(Sign(sign_R * sign_sigma * sign_delta));
|
||||
|
||||
// FT D = CGAL_NTS square(A) + CGAL_NTS square(B);
|
||||
// FT P = D - CGAL_NTS square(R);
|
||||
// FT D = CGAL::square(A) + CGAL::square(B);
|
||||
// FT P = D - CGAL::square(R);
|
||||
|
||||
FT F3 = P * delta2 + CGAL_NTS square(R * sigma) -
|
||||
CGAL_NTS square(r * D);
|
||||
FT F3 = P * delta2 + CGAL::square(R * sigma) -
|
||||
CGAL::square(r * D);
|
||||
|
||||
Sign sign_E6 = CGAL_NTS sign(F3);
|
||||
Sign sign_E6 = CGAL::sign(F3);
|
||||
|
||||
if ( sign_E5 == ZERO ) {
|
||||
return Sign(sign_E1_plus_E3_P * sign_E6);
|
||||
|
|
@ -1014,15 +1014,15 @@ public:
|
|||
return Sign(sign_E1_plus_E3_P * sign_E5);
|
||||
}
|
||||
|
||||
// FT p = d - CGAL_NTS square(r);
|
||||
// FT p = d - CGAL::square(r);
|
||||
FT rR = r * R;
|
||||
FT pP = p * P;
|
||||
//error();
|
||||
FT F4 = CGAL_NTS square(sigma - rR) - pP;
|
||||
FT F5 = CGAL_NTS square(sigma + rR) - pP;
|
||||
FT F4 = CGAL::square(sigma - rR) - pP;
|
||||
FT F5 = CGAL::square(sigma + rR) - pP;
|
||||
|
||||
Sign sign_E7 =
|
||||
opposite(Sign(CGAL_NTS sign(F4) * CGAL_NTS sign(F5)));
|
||||
opposite(Sign(CGAL::sign(F4) * CGAL::sign(F5)));
|
||||
|
||||
return Sign(sign_E1_plus_E3_P * sign_E5 * sign_E7);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,21 +76,21 @@ public:
|
|||
const FT& a2, const FT& b2, const FT& c2)
|
||||
{
|
||||
// works correctly only with leda_real
|
||||
FT D1 = CGAL_NTS square(b1) - a1 * c1;
|
||||
FT D1 = CGAL::square(b1) - a1 * c1;
|
||||
|
||||
FT l1 = (b1 - CGAL_NTS sqrt(D1)) / a1;
|
||||
FT r1 = (b1 + CGAL_NTS sqrt(D1)) / a1;
|
||||
FT l1 = (b1 - CGAL::sqrt(D1)) / a1;
|
||||
FT r1 = (b1 + CGAL::sqrt(D1)) / a1;
|
||||
if ( a1 < 0 ) { std::swap(r1, l1); }
|
||||
|
||||
FT D2 = CGAL_NTS square(b2) - a2 * c2;
|
||||
FT D2 = CGAL::square(b2) - a2 * c2;
|
||||
|
||||
if ( D1 == 0 || D2 == 0 ) {
|
||||
case_degenerate_counter++;
|
||||
return;
|
||||
}
|
||||
|
||||
FT l2 = (b2 - CGAL_NTS sqrt(D2)) / a2;
|
||||
FT r2 = (b2 + CGAL_NTS sqrt(D2)) / a2;
|
||||
FT l2 = (b2 - CGAL::sqrt(D2)) / a2;
|
||||
FT r2 = (b2 + CGAL::sqrt(D2)) / a2;
|
||||
if ( a2 < 0 ) { std::swap(r2, l2); }
|
||||
|
||||
if ( l1 < l2 ) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ template < class FT >
|
|||
inline FT
|
||||
value_of_D(const FT& a, const FT& b, const FT& c)
|
||||
{
|
||||
return CGAL_NTS square(b) - a * c;
|
||||
return CGAL::square(b) - a * c;
|
||||
}
|
||||
|
||||
template < class FT >
|
||||
|
|
@ -95,7 +95,7 @@ value_of_R0(const FT& J, const FT& Jp,
|
|||
const FT& a1, const FT& c1,
|
||||
const FT& a2, const FT& c2)
|
||||
{
|
||||
return CGAL_NTS square(a1 * c2 - c1 * a2) - FT(4) * J * Jp;
|
||||
return CGAL::square(a1 * c2 - c1 * a2) - FT(4) * J * Jp;
|
||||
}
|
||||
|
||||
template < class FT >
|
||||
|
|
@ -103,7 +103,7 @@ template < class FT >
|
|||
inline FT
|
||||
value_of_R0(const FT& D1, const FT& D2, const FT& K)
|
||||
{
|
||||
return CGAL_NTS square(K) - FT(4) * D1 * D2;
|
||||
return CGAL::square(K) - FT(4) * D1 * D2;
|
||||
}
|
||||
|
||||
template < class FT >
|
||||
|
|
@ -111,7 +111,7 @@ template < class FT >
|
|||
inline FT
|
||||
value_of_P4(const FT& D1, const FT& D2, const FT& K)
|
||||
{
|
||||
return FT(4) * D1 * D2 - CGAL_NTS square(K);
|
||||
return FT(4) * D1 * D2 - CGAL::square(K);
|
||||
}
|
||||
|
||||
template < class FT >
|
||||
|
|
@ -119,7 +119,7 @@ template < class FT >
|
|||
inline FT
|
||||
value_of_D(const FT& a1, const FT& D1, const FT& a2, const FT& D2)
|
||||
{
|
||||
return D1 * CGAL_NTS square(a2) - D2 * CGAL_NTS square(a1);
|
||||
return D1 * CGAL::square(a2) - D2 * CGAL::square(a1);
|
||||
}
|
||||
|
||||
template < class FT >
|
||||
|
|
@ -210,10 +210,10 @@ sqrt_compare_l1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT D1 = value_of_D(a1, b1, c1);
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
|
||||
FT l1 = ( b1 - CGAL_NTS sqrt(D1) ) / a1;
|
||||
FT l2 = ( b2 - CGAL_NTS sqrt(D2) ) / a2;
|
||||
FT l1 = ( b1 - CGAL::sqrt(D1) ) / a1;
|
||||
FT l2 = ( b2 - CGAL::sqrt(D2) ) / a2;
|
||||
|
||||
return CGAL_NTS compare(l1, l2);
|
||||
return CGAL::compare(l1, l2);
|
||||
}
|
||||
|
||||
template < class FT >
|
||||
|
|
@ -225,10 +225,10 @@ sqrt_compare_l1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT D1 = value_of_D(a1, b1, c1);
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
|
||||
FT l1 = ( b1 - CGAL_NTS sqrt(D1) ) / a1;
|
||||
FT r2 = ( b2 + CGAL_NTS sqrt(D2) ) / a2;
|
||||
FT l1 = ( b1 - CGAL::sqrt(D1) ) / a1;
|
||||
FT r2 = ( b2 + CGAL::sqrt(D2) ) / a2;
|
||||
|
||||
return CGAL_NTS compare(l1, r2);
|
||||
return CGAL::compare(l1, r2);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -241,10 +241,10 @@ sqrt_compare_r1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT D1 = value_of_D(a1, b1, c1);
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
|
||||
FT r1 = ( b1 + CGAL_NTS sqrt(D1) ) / a1;
|
||||
FT l2 = ( b2 - CGAL_NTS sqrt(D2) ) / a2;
|
||||
FT r1 = ( b1 + CGAL::sqrt(D1) ) / a1;
|
||||
FT l2 = ( b2 - CGAL::sqrt(D2) ) / a2;
|
||||
|
||||
return CGAL_NTS compare(r1, l2);
|
||||
return CGAL::compare(r1, l2);
|
||||
}
|
||||
|
||||
template < class FT >
|
||||
|
|
@ -256,10 +256,10 @@ sqrt_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT D1 = value_of_D(a1, b1, c1);
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
|
||||
FT r1 = ( b1 + CGAL_NTS sqrt(D1) ) / a1;
|
||||
FT r2 = ( b2 + CGAL_NTS sqrt(D2) ) / a2;
|
||||
FT r1 = ( b1 + CGAL::sqrt(D1) ) / a1;
|
||||
FT r2 = ( b2 + CGAL::sqrt(D2) ) / a2;
|
||||
|
||||
return CGAL_NTS compare(r1, r2);
|
||||
return CGAL::compare(r1, r2);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -278,43 +278,43 @@ dfmt_compare_l1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT J = value_of_J(a1, b1, a2, b2);
|
||||
FT K = value_of_K(a1, b1, c1, a2, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_positive(J) ) {
|
||||
if ( CGAL_NTS is_positive(K) ) return SMALLER; // l1 < l2
|
||||
if ( CGAL::is_positive(J) ) {
|
||||
if ( CGAL::is_positive(K) ) return SMALLER; // l1 < l2
|
||||
|
||||
FT D1 = value_of_D(a1, b1, c1);
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
|
||||
FT D = value_of_D(a1, D1, a2, D2);
|
||||
|
||||
if ( CGAL_NTS is_positive(D) ) return SMALLER; // l1 < l2
|
||||
if ( CGAL::is_positive(D) ) return SMALLER; // l1 < l2
|
||||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_negative(Jp) ) return LARGER; // l1 > l2
|
||||
if ( CGAL::is_negative(Jp) ) return LARGER; // l1 > l2
|
||||
|
||||
FT R0 = value_of_R0(D1, D2, K);
|
||||
|
||||
Sign s_R0 = CGAL_NTS sign(R0);
|
||||
Sign s_R0 = CGAL::sign(R0);
|
||||
if ( s_R0 == NEGATIVE ) return SMALLER; // l1 < l2
|
||||
if ( s_R0 == POSITIVE ) return LARGER; // l1 > l2
|
||||
return EQUAL;
|
||||
} else { // J<0
|
||||
if ( CGAL_NTS is_positive(K) ) return LARGER; // l1 > l2
|
||||
if ( CGAL::is_positive(K) ) return LARGER; // l1 > l2
|
||||
|
||||
FT D1 = value_of_D(a1, b1, c1);
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
|
||||
FT D = value_of_D(a1, D1, a2, D2);
|
||||
|
||||
if ( CGAL_NTS is_negative(D) ) return LARGER; // l1 > l2
|
||||
if ( CGAL::is_negative(D) ) return LARGER; // l1 > l2
|
||||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_positive(Jp) ) return SMALLER; // l1 < l2
|
||||
if ( CGAL::is_positive(Jp) ) return SMALLER; // l1 < l2
|
||||
|
||||
FT R0 = value_of_R0(D1, D2, K);
|
||||
|
||||
Sign s_R0 = CGAL_NTS sign(R0);
|
||||
Sign s_R0 = CGAL::sign(R0);
|
||||
if ( s_R0 == NEGATIVE ) return LARGER; // l1 > l2
|
||||
if ( s_R0 == POSITIVE ) return SMALLER; // l1 < l2
|
||||
return EQUAL;
|
||||
|
|
@ -329,19 +329,19 @@ dfmt_compare_l1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
{
|
||||
FT J = value_of_J(a1, b1, a2, b2);
|
||||
|
||||
if ( CGAL_NTS is_positive(J) ) return SMALLER; // l1 < r2
|
||||
if ( CGAL::is_positive(J) ) return SMALLER; // l1 < r2
|
||||
|
||||
FT K = value_of_K(a1, b1, c1, a2, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_negative(K) ) return SMALLER; // l1 < r2
|
||||
if ( CGAL::is_negative(K) ) return SMALLER; // l1 < r2
|
||||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_positive(Jp) ) return LARGER; // l1 > r2
|
||||
if ( CGAL::is_positive(Jp) ) return LARGER; // l1 > r2
|
||||
|
||||
FT R0 = value_of_R0(J, Jp, a1, c1, a2, c2);
|
||||
|
||||
Sign s_R0 = CGAL_NTS sign(R0);
|
||||
Sign s_R0 = CGAL::sign(R0);
|
||||
if ( s_R0 == NEGATIVE ) return SMALLER; // l1 < r2
|
||||
if ( s_R0 == POSITIVE ) return LARGER; // l1 > r2
|
||||
return EQUAL;
|
||||
|
|
@ -357,19 +357,19 @@ dfmt_compare_r1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
{
|
||||
FT J = value_of_J(a1, b1, a2, b2);
|
||||
|
||||
if ( CGAL_NTS is_negative(J) ) return LARGER; // r1 > l2
|
||||
if ( CGAL::is_negative(J) ) return LARGER; // r1 > l2
|
||||
|
||||
FT K = value_of_K(a1, b1, c1, a2, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_negative(K) ) return LARGER; // r1 > l2
|
||||
if ( CGAL::is_negative(K) ) return LARGER; // r1 > l2
|
||||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_negative(Jp) ) return SMALLER; // r1 < l2
|
||||
if ( CGAL::is_negative(Jp) ) return SMALLER; // r1 < l2
|
||||
|
||||
FT R0 = value_of_R0(J, Jp, a1, c1, a2, c2);
|
||||
|
||||
Sign s_R0 = CGAL_NTS sign(R0);
|
||||
Sign s_R0 = CGAL::sign(R0);
|
||||
if ( s_R0 == NEGATIVE ) return LARGER; // r1 > l2
|
||||
if ( s_R0 == POSITIVE ) return SMALLER; // r1 < l2
|
||||
return EQUAL;
|
||||
|
|
@ -388,8 +388,8 @@ dfmt_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT J = value_of_J(a1, b1, a2, b2);
|
||||
FT K = value_of_K(a1, b1, c1, a2, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_positive(J) ){
|
||||
if ( CGAL_NTS is_positive(K) ) return SMALLER; // r1 < r2 1,2
|
||||
if ( CGAL::is_positive(J) ){
|
||||
if ( CGAL::is_positive(K) ) return SMALLER; // r1 < r2 1,2
|
||||
|
||||
#ifdef COMPARATOR_PROFILER
|
||||
comparator_profiler::counter_rr_e++;
|
||||
|
|
@ -400,7 +400,7 @@ dfmt_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
|
||||
FT D = value_of_D(a1, D1, a2, D2);
|
||||
|
||||
if ( CGAL_NTS is_negative(D) ) return SMALLER; // r1 < r2 2,3b
|
||||
if ( CGAL::is_negative(D) ) return SMALLER; // r1 < r2 2,3b
|
||||
|
||||
#ifdef COMPARATOR_PROFILER
|
||||
comparator_profiler::counter_rr_r0++;
|
||||
|
|
@ -408,16 +408,16 @@ dfmt_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_negative(Jp) ) return LARGER; // r1 > r2 3a
|
||||
if ( CGAL::is_negative(Jp) ) return LARGER; // r1 > r2 3a
|
||||
|
||||
FT R0 = value_of_R0(D1, D2, K);
|
||||
|
||||
Sign s_R0 = CGAL_NTS sign(R0);
|
||||
Sign s_R0 = CGAL::sign(R0);
|
||||
if ( s_R0 == NEGATIVE ) return SMALLER; // r1 < r2 2
|
||||
if ( s_R0 == POSITIVE ) return LARGER; // r1 > r2 3a
|
||||
return EQUAL;
|
||||
} else { // J<0
|
||||
if ( CGAL_NTS is_positive(K) ) return LARGER; // r1 > r2 4,5
|
||||
if ( CGAL::is_positive(K) ) return LARGER; // r1 > r2 4,5
|
||||
|
||||
#ifdef COMPARATOR_PROFILER
|
||||
comparator_profiler::counter_rr_e++;
|
||||
|
|
@ -428,7 +428,7 @@ dfmt_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
|
||||
FT D = value_of_D(a1, D1, a2, D2);
|
||||
|
||||
if ( CGAL_NTS is_positive(D) ) return LARGER; // r1 > r2 3a,4
|
||||
if ( CGAL::is_positive(D) ) return LARGER; // r1 > r2 3a,4
|
||||
|
||||
#ifdef COMPARATOR_PROFILER
|
||||
comparator_profiler::counter_rr_r0++;
|
||||
|
|
@ -436,11 +436,11 @@ dfmt_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_positive(Jp) ) return SMALLER; // r1 < r2 3b
|
||||
if ( CGAL::is_positive(Jp) ) return SMALLER; // r1 < r2 3b
|
||||
|
||||
FT R0 = value_of_P4(D1, D2, K);
|
||||
|
||||
Sign s_R0 = CGAL_NTS sign(R0);
|
||||
Sign s_R0 = CGAL::sign(R0);
|
||||
if ( s_R0 == NEGATIVE ) return LARGER; // r1 > r2 4
|
||||
if ( s_R0 == POSITIVE ) return SMALLER; // r1 < r2 3b
|
||||
return EQUAL;
|
||||
|
|
@ -458,10 +458,10 @@ ke_compare_l1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
const FT& a2, const FT& b2, const FT& c2)
|
||||
{
|
||||
FT J = value_of_J(a1, b1, a2, b2);
|
||||
Sign s_J = CGAL_NTS sign(J);
|
||||
Sign s_J = CGAL::sign(J);
|
||||
|
||||
if ( s_J == ZERO ) {
|
||||
Sign s_G = CGAL_NTS sign( value_of_G(a1, c1, a2, c2) );
|
||||
Sign s_G = CGAL::sign( value_of_G(a1, c1, a2, c2) );
|
||||
if ( s_G == POSITIVE ) { return SMALLER; }
|
||||
if ( s_G == NEGATIVE ) { return LARGER; }
|
||||
return EQUAL;
|
||||
|
|
@ -470,14 +470,14 @@ ke_compare_l1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT a1c2 = a1 * c2;
|
||||
FT a2c1 = a2 * c1;
|
||||
FT K = value_of_K(a1c2, a2c1, b1 * b2);
|
||||
Sign s_K = CGAL_NTS sign(K);
|
||||
Sign s_K = CGAL::sign(K);
|
||||
|
||||
if ( s_J == POSITIVE ) {
|
||||
if ( s_K == POSITIVE ) { return SMALLER; }
|
||||
|
||||
if ( s_K == ZERO ) {
|
||||
FT D1 = value_of_D(a1, b1, c1);
|
||||
if ( CGAL_NTS is_zero(D1) ) { return EQUAL; }
|
||||
if ( CGAL::is_zero(D1) ) { return EQUAL; }
|
||||
|
||||
return SMALLER;
|
||||
}
|
||||
|
|
@ -485,15 +485,15 @@ ke_compare_l1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT G = a1c2 - a2c1;
|
||||
FT P3inf = value_of_P3inf(a1, b1, J, G);
|
||||
|
||||
if ( !(CGAL_NTS is_positive(P3inf)) ) { return SMALLER; }
|
||||
if ( !(CGAL::is_positive(P3inf)) ) { return SMALLER; }
|
||||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_negative(Jp) ) { return LARGER; }
|
||||
if ( CGAL::is_negative(Jp) ) { return LARGER; }
|
||||
|
||||
FT P4 = value_of_P4(J, Jp, G);
|
||||
|
||||
Sign s_P4 = CGAL_NTS sign(P4);
|
||||
Sign s_P4 = CGAL::sign(P4);
|
||||
if ( s_P4 == POSITIVE ) { return SMALLER; }
|
||||
if ( s_P4 == NEGATIVE ) { return LARGER; }
|
||||
return EQUAL;
|
||||
|
|
@ -502,22 +502,22 @@ ke_compare_l1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
|
||||
if ( s_K == ZERO ) {
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
if ( CGAL_NTS is_zero(D2) ) { return EQUAL; }
|
||||
if ( CGAL::is_zero(D2) ) { return EQUAL; }
|
||||
|
||||
return LARGER;
|
||||
}
|
||||
FT G = a1c2 - a2c1;
|
||||
FT P3inf = value_of_P3inf(a1, b1, J, G);
|
||||
|
||||
if ( !(CGAL_NTS is_negative(P3inf)) ) { return LARGER; }
|
||||
if ( !(CGAL::is_negative(P3inf)) ) { return LARGER; }
|
||||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_positive(Jp) ) { return SMALLER; }
|
||||
if ( CGAL::is_positive(Jp) ) { return SMALLER; }
|
||||
|
||||
FT P4 = value_of_P4(J, Jp, G);
|
||||
|
||||
Sign s_P4 = CGAL_NTS sign(P4);
|
||||
Sign s_P4 = CGAL::sign(P4);
|
||||
if ( s_P4 == POSITIVE ) { return LARGER; }
|
||||
if ( s_P4 == NEGATIVE ) { return SMALLER; }
|
||||
return EQUAL;
|
||||
|
|
@ -531,15 +531,15 @@ ke_compare_l1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
const FT& a2, const FT& b2, const FT& c2)
|
||||
{
|
||||
FT J = value_of_J(a1, b1, a2, b2);
|
||||
FT s_J = CGAL_NTS sign(J);
|
||||
FT s_J = CGAL::sign(J);
|
||||
|
||||
#if 0
|
||||
if ( s_J == ZERO ) {
|
||||
FT D1 = value_of_D(a1, b1, c1);
|
||||
if ( CGAL_NTS is_positive(D1) ) { return SMALLER; }
|
||||
if ( CGAL::is_positive(D1) ) { return SMALLER; }
|
||||
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
if ( CGAL_NTS is_positive(D2) ) { return SMALLER; }
|
||||
if ( CGAL::is_positive(D2) ) { return SMALLER; }
|
||||
|
||||
return EQUAL;
|
||||
}
|
||||
|
|
@ -550,16 +550,16 @@ ke_compare_l1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT a1c2 = a1 * c2;
|
||||
FT a2c1 = a2 * c1;
|
||||
FT K = value_of_K(a1c2, a2c1, b1 * b2);
|
||||
Sign s_K = CGAL_NTS sign(K);
|
||||
Sign s_K = CGAL::sign(K);
|
||||
|
||||
if ( s_K == NEGATIVE ) { return SMALLER; }
|
||||
#if 0
|
||||
if ( s_K == ZERO ) {
|
||||
FT D1 = value_of_D(a1, b1, c1);
|
||||
if ( CGAL_NTS is_zero(D1) ) { return EQUAL; }
|
||||
if ( CGAL::is_zero(D1) ) { return EQUAL; }
|
||||
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
if ( CGAL_NTS is_zero(D2) ) { return EQUAL; }
|
||||
if ( CGAL::is_zero(D2) ) { return EQUAL; }
|
||||
|
||||
return SMALLER;
|
||||
}
|
||||
|
|
@ -567,11 +567,11 @@ ke_compare_l1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_positive(Jp) ) { return LARGER; }
|
||||
if ( CGAL::is_positive(Jp) ) { return LARGER; }
|
||||
|
||||
FT P4 = value_of_P4(J, Jp, a1c2 - a2c1);
|
||||
|
||||
Sign s_P4 = CGAL_NTS sign(P4);
|
||||
Sign s_P4 = CGAL::sign(P4);
|
||||
if ( s_P4 == POSITIVE ) { return SMALLER; }
|
||||
if ( s_P4 == NEGATIVE ) { return LARGER; }
|
||||
return EQUAL;
|
||||
|
|
@ -584,15 +584,15 @@ ke_compare_r1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
const FT& a2, const FT& b2, const FT& c2)
|
||||
{
|
||||
FT J = value_of_J(a1, b1, a2, b2);
|
||||
FT s_J = CGAL_NTS sign(J);
|
||||
FT s_J = CGAL::sign(J);
|
||||
|
||||
#if 0
|
||||
if ( s_J == ZERO ) {
|
||||
FT D1 = value_of_D(a1, b1, c1);
|
||||
if ( CGAL_NTS is_positive(D1) ) { return LARGER; }
|
||||
if ( CGAL::is_positive(D1) ) { return LARGER; }
|
||||
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
if ( CGAL_NTS is_positive(D2) ) { return LARGER; }
|
||||
if ( CGAL::is_positive(D2) ) { return LARGER; }
|
||||
|
||||
return EQUAL;
|
||||
}
|
||||
|
|
@ -603,17 +603,17 @@ ke_compare_r1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT a1c2 = a1 * c2;
|
||||
FT a2c1 = a2 * c1;
|
||||
FT K = value_of_K(a1c2, a2c1, b1 * b2);
|
||||
Sign s_K = CGAL_NTS sign(K);
|
||||
Sign s_K = CGAL::sign(K);
|
||||
|
||||
if ( s_K == NEGATIVE ) { return LARGER; }
|
||||
|
||||
#if 0
|
||||
if ( s_K == ZERO ) {
|
||||
FT D1 = value_of_D(a1, b1, c1);
|
||||
if ( CGAL_NTS is_zero(D1) ) { return EQUAL; }
|
||||
if ( CGAL::is_zero(D1) ) { return EQUAL; }
|
||||
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
if ( CGAL_NTS is_zero(D2) ) { return EQUAL; }
|
||||
if ( CGAL::is_zero(D2) ) { return EQUAL; }
|
||||
|
||||
return LARGER;
|
||||
}
|
||||
|
|
@ -621,11 +621,11 @@ ke_compare_r1_l2(const FT& a1, const FT& b1, const FT& c1,
|
|||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_negative(Jp) ) { return SMALLER; }
|
||||
if ( CGAL::is_negative(Jp) ) { return SMALLER; }
|
||||
|
||||
FT P4 = value_of_P4(J, Jp, a1c2 - a2c1);
|
||||
|
||||
Sign s_P4 = CGAL_NTS sign(P4);
|
||||
Sign s_P4 = CGAL::sign(P4);
|
||||
if ( s_P4 == POSITIVE ) { return LARGER; }
|
||||
if ( s_P4 == NEGATIVE ) { return SMALLER; }
|
||||
return EQUAL;
|
||||
|
|
@ -642,12 +642,12 @@ ke_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
#endif
|
||||
|
||||
FT J = value_of_J(a1, b1, a2, b2);
|
||||
Sign s_J = CGAL_NTS sign(J);
|
||||
Sign s_J = CGAL::sign(J);
|
||||
|
||||
FT a1c2 = a1 * c2;
|
||||
FT a2c1 = a2 * c1;
|
||||
FT K = value_of_K(a1c2, a2c1, b1 * b2);
|
||||
Sign s_K = CGAL_NTS sign(K);
|
||||
Sign s_K = CGAL::sign(K);
|
||||
|
||||
if ( s_J == POSITIVE ) {
|
||||
if ( s_K == POSITIVE ) { return SMALLER; }
|
||||
|
|
@ -660,7 +660,7 @@ ke_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT G = a1c2 - a2c1;
|
||||
FT P3inf = value_of_P3inf(a1, b1, J, G);
|
||||
|
||||
if ( !(CGAL_NTS is_negative(P3inf)) ) { return SMALLER; }
|
||||
if ( !(CGAL::is_negative(P3inf)) ) { return SMALLER; }
|
||||
|
||||
#ifdef COMPARATOR_PROFILER
|
||||
comparator_profiler::counter_rr_p4++;
|
||||
|
|
@ -668,17 +668,17 @@ ke_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_negative(Jp) ) { return LARGER; }
|
||||
if ( CGAL::is_negative(Jp) ) { return LARGER; }
|
||||
|
||||
FT P4 = value_of_P4(J, Jp, G);
|
||||
|
||||
Sign s_P4 = CGAL_NTS sign(P4);
|
||||
Sign s_P4 = CGAL::sign(P4);
|
||||
if ( s_P4 == POSITIVE ) { return SMALLER; }
|
||||
if ( s_P4 == NEGATIVE ) { return LARGER; }
|
||||
return EQUAL;
|
||||
} else { // K = 0
|
||||
FT D2 = value_of_D(a2, b2, c2);
|
||||
if ( CGAL_NTS is_zero(D2) ) { return EQUAL; }
|
||||
if ( CGAL::is_zero(D2) ) { return EQUAL; }
|
||||
|
||||
return SMALLER;
|
||||
}
|
||||
|
|
@ -693,7 +693,7 @@ ke_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
FT G = a1c2 - a2c1;
|
||||
FT P3inf = value_of_P3inf(a1, b1, J, G);
|
||||
|
||||
if ( !(CGAL_NTS is_positive(P3inf)) ) { return LARGER; }
|
||||
if ( !(CGAL::is_positive(P3inf)) ) { return LARGER; }
|
||||
|
||||
#ifdef COMPARATOR_PROFILER
|
||||
comparator_profiler::counter_rr_p4++;
|
||||
|
|
@ -701,22 +701,22 @@ ke_compare_r1_r2(const FT& a1, const FT& b1, const FT& c1,
|
|||
|
||||
FT Jp = value_of_Jp(b1, c1, b2, c2);
|
||||
|
||||
if ( CGAL_NTS is_positive(Jp) ) { return SMALLER; }
|
||||
if ( CGAL::is_positive(Jp) ) { return SMALLER; }
|
||||
|
||||
FT P4 = value_of_P4(J, Jp, G);
|
||||
|
||||
Sign s_P4 = CGAL_NTS sign(P4);
|
||||
Sign s_P4 = CGAL::sign(P4);
|
||||
if ( s_P4 == POSITIVE ) { return LARGER; }
|
||||
if ( s_P4 == NEGATIVE ) { return SMALLER; }
|
||||
return EQUAL;
|
||||
} else { // K = 0
|
||||
FT D1 = value_of_D(a1, b1, c1);
|
||||
if ( CGAL_NTS is_zero(D1) ) { return EQUAL; }
|
||||
if ( CGAL::is_zero(D1) ) { return EQUAL; }
|
||||
|
||||
return LARGER;
|
||||
}
|
||||
} else { // J = 0
|
||||
Sign s_G = CGAL_NTS sign( value_of_G(a1, c1, a2, c2) );
|
||||
Sign s_G = CGAL::sign( value_of_G(a1, c1, a2, c2) );
|
||||
if ( s_G == NEGATIVE ) { return SMALLER; }
|
||||
if ( s_G == POSITIVE ) { return LARGER; }
|
||||
return EQUAL;
|
||||
|
|
@ -749,8 +749,8 @@ sqrt_compare_r1_r2_filtered(const CT& a1, const CT& b1, const CT& c1,
|
|||
IT D1 = value_of_D(a1i, b1i, c1i);
|
||||
IT D2 = value_of_D(a2i, b2i, c2i);
|
||||
|
||||
IT r1 = ( b1i + CGAL_NTS sqrt(D1) ) / a1i;
|
||||
IT r2 = ( b2i + CGAL_NTS sqrt(D2) ) / a2i;
|
||||
IT r1 = ( b1i + CGAL::sqrt(D1) ) / a1i;
|
||||
IT r2 = ( b2i + CGAL::sqrt(D2) ) / a2i;
|
||||
|
||||
FPU_set_cw(backup);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue