diff -r 85cb3aa71cce -r 0c8e5c688440 tools/lgf-gen.cc --- a/tools/lgf-gen.cc Tue Apr 21 15:18:54 2009 +0100 +++ b/tools/lgf-gen.cc Thu Apr 23 10:44:35 2009 +0100 @@ -65,7 +65,7 @@ double totalLen(){ double tlen=0; for(EdgeIt e(g);e!=INVALID;++e) - tlen+=sqrt((coords[g.v(e)]-coords[g.u(e)]).normSquare()); + tlen+=std::sqrt((coords[g.v(e)]-coords[g.u(e)]).normSquare()); return tlen; } @@ -188,7 +188,7 @@ (q.x * q.x + q.y * q.y) * (r.x * p.y - p.x * r.y) + (r.x * r.x + r.y * r.y) * (p.x * q.y - q.x * p.y); - return d / (2 * a) + sqrt((d * d + e * e) / (4 * a * a) + f / a); + return d / (2 * a) + std::sqrt((d * d + e * e) / (4 * a * a) + f / a); } inline bool circle_form(const Point& p, const Point& q, const Point& r) { @@ -206,7 +206,7 @@ double a = q.x - p.x; double b = (q.x - sx) * p.y - (p.x - sx) * q.y; double d = (q.x - sx) * (p.x - sx) * (p - q).normSquare(); - return (b - sqrt(d)) / a; + return (b - std::sqrt(d)) / a; } struct YLess { @@ -813,7 +813,7 @@ std::cout << "Number of arcs : " << countEdges(g) << std::endl; double tlen=0; for(EdgeIt e(g);e!=INVALID;++e) - tlen+=sqrt((coords[g.v(e)]-coords[g.u(e)]).normSquare()); + tlen+=std::sqrt((coords[g.v(e)]-coords[g.u(e)]).normSquare()); std::cout << "Total arc length : " << tlen << std::endl; if(ap["eps"])