Changeset 612:0c8e5c688440 in lemon-main for tools
- Timestamp:
- 04/23/09 11:44:35 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/lgf-gen.cc
r584 r612 66 66 double tlen=0; 67 67 for(EdgeIt e(g);e!=INVALID;++e) 68 tlen+=s qrt((coords[g.v(e)]-coords[g.u(e)]).normSquare());68 tlen+=std::sqrt((coords[g.v(e)]-coords[g.u(e)]).normSquare()); 69 69 return tlen; 70 70 } … … 189 189 (r.x * r.x + r.y * r.y) * (p.x * q.y - q.x * p.y); 190 190 191 return d / (2 * a) + s qrt((d * d + e * e) / (4 * a * a) + f / a);191 return d / (2 * a) + std::sqrt((d * d + e * e) / (4 * a * a) + f / a); 192 192 } 193 193 … … 207 207 double b = (q.x - sx) * p.y - (p.x - sx) * q.y; 208 208 double d = (q.x - sx) * (p.x - sx) * (p - q).normSquare(); 209 return (b - s qrt(d)) / a;209 return (b - std::sqrt(d)) / a; 210 210 } 211 211 … … 814 814 double tlen=0; 815 815 for(EdgeIt e(g);e!=INVALID;++e) 816 tlen+=s qrt((coords[g.v(e)]-coords[g.u(e)]).normSquare());816 tlen+=std::sqrt((coords[g.v(e)]-coords[g.u(e)]).normSquare()); 817 817 std::cout << "Total arc length : " << tlen << std::endl; 818 818
Note: See TracChangeset
for help on using the changeset viewer.