diff --git a/tools/lgf-gen.cc b/tools/lgf-gen.cc --- a/tools/lgf-gen.cc +++ b/tools/lgf-gen.cc @@ -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"])