Browse Source

Fix precision issue with real and as the crow flies length.

Mikaël Capelle 5 years ago
parent
commit
423e36fc65
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/main/org/insa/graph/io/BinaryGraphReader.java

+ 3
- 0
src/main/org/insa/graph/io/BinaryGraphReader.java View File

249
                 }
249
                 }
250
                 maxLength = Math.max(length, maxLength);
250
                 maxLength = Math.max(length, maxLength);
251
 
251
 
252
+                length = Math.max(length, (float) Point.distance(nodes.get(node).getPoint(),
253
+                        nodes.get(destNode).getPoint()));
254
+
252
                 // Number of segments.
255
                 // Number of segments.
253
                 int nbSegments = dis.readUnsignedShort();
256
                 int nbSegments = dis.readUnsignedShort();
254
 
257
 

Loading…
Cancel
Save