Changeset 11481 in josm for trunk/src/org
- Timestamp:
- 2017-01-18T09:04:51+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r11109 r11481 111 111 return candidates.get(size - 1); 112 112 case 1: 113 double east1 = 0, north1 = 0; 113 double east1 = 0; 114 double north1 = 0; 114 115 for (final Node n : candidates) { 115 116 EastNorth en = n.getEastNorth(); … … 132 133 } 133 134 134 double east2 = 0, north2 = 0, weight = 0; 135 double east2 = 0; 136 double north2 = 0; 137 double weight = 0; 135 138 for (int i = 0; i < size; i++) { 136 139 final EastNorth en = candidates.get(i).getEastNorth(); … … 140 143 weight += w; 141 144 } 145 146 if (weight == 0) // to avoid division by 0 147 return candidates.get(0); 142 148 143 149 return new Node(new EastNorth(east2 / weight, north2 / weight));
Note:
See TracChangeset
for help on using the changeset viewer.