Changeset 8850 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2015-10-10T15:15:14+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r8836 r8850 255 255 wayDataList.get(0).calcDirections(Direction.RIGHT); 256 256 double refHeading = wayDataList.get(0).heading; 257 EastNorth totSum = new EastNorth(0., 0.); 257 258 for (WayData w : wayDataList) { 258 259 w.calcDirections(Direction.RIGHT); 259 260 int directionOffset = angleToDirectionChange(w.heading - refHeading, TOLERANCE2); 260 261 w.calcDirections(Direction.RIGHT.changeBy(directionOffset)); 261 if (angleToDirectionChange(refHeading - w.heading, TOLERANCE2) != 0) throw new RuntimeException(); 262 } 263 EastNorth totSum = new EastNorth(0., 0.); 264 for (WayData w : wayDataList) { 262 if (angleToDirectionChange(refHeading - w.heading, TOLERANCE2) != 0) 263 throw new RuntimeException(); 265 264 totSum = EN.sum(totSum, w.segSum); 266 265 } … … 343 342 } 344 343 } 344 345 final Map<Node, Double> nC = (orientation == HORIZONTAL) ? nY : nX; 346 347 double average = 0; 345 348 for (Node n : cs) { 346 349 s.remove(n); 347 }348 349 final Map<Node, Double> nC = (orientation == HORIZONTAL) ? nY : nX;350 351 double average = 0;352 for (Node n : cs) {353 350 average += nC.get(n).doubleValue(); 354 351 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r8840 r8850 652 652 for (int i : is) { 653 653 segSet.add(Pair.sort(new Pair<>(w.getNode(i), w.getNode(i+1)))); 654 }655 for (int i : is) {656 654 wnew.addNode(i + 1, n); 657 655 }
Note:
See TracChangeset
for help on using the changeset viewer.