COIN-OR::LEMON - Graph Library

Changeset 1360:4338e4280f67 in lemon-0.x


Ignore:
Timestamp:
04/15/05 22:26:01 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1805
Message:

Fix a bug that caused corrupt eps file if there are loops or identical
node coordinates in the graph.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/graph_to_eps.h

    r1359 r1360  
    810810          sw/=-2.0;
    811811          xy<double> dvec(_coords[g.target(*i)]-_coords[g.source(*i)]);
    812           double l=sqrt(dvec.normSquare());
    813           xy<double> d(dvec/l);
     812          double l=sqrt(dvec.normSquare());
     813          ///\todo better 'epsilon' would be nice here.
     814          xy<double> d(dvec/max(l,1e-9));
    814815          xy<double> m;
    815816//        m=xy<double>(_coords[g.target(*i)]+_coords[g.source(*i)])/2.0;
Note: See TracChangeset for help on using the changeset viewer.