1.1 --- a/src/lemon/graph_to_eps.h Fri Apr 15 19:56:25 2005 +0000
1.2 +++ b/src/lemon/graph_to_eps.h Fri Apr 15 20:26:01 2005 +0000
1.3 @@ -809,8 +809,9 @@
1.4 sw-=_parEdgeDist;
1.5 sw/=-2.0;
1.6 xy<double> dvec(_coords[g.target(*i)]-_coords[g.source(*i)]);
1.7 - double l=sqrt(dvec.normSquare());
1.8 - xy<double> d(dvec/l);
1.9 + double l=sqrt(dvec.normSquare());
1.10 + ///\todo better 'epsilon' would be nice here.
1.11 + xy<double> d(dvec/max(l,1e-9));
1.12 xy<double> m;
1.13 // m=xy<double>(_coords[g.target(*i)]+_coords[g.source(*i)])/2.0;
1.14