Changeset 6230 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2013-09-11T00:41:49+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
r6130 r6230 38 38 public final class AlignInCircleAction extends JosmAction { 39 39 40 /** 41 * Constructs a new {@code AlignInCircleAction}. 42 */ 40 43 public AlignInCircleAction() { 41 44 super(tr("Align Nodes in Circle"), "aligncircle", tr("Move the selected nodes into a circle."), … … 151 154 // First calculate the average point 152 155 153 BigDecimal east = new BigDecimal(0);154 BigDecimal north = new BigDecimal(0);156 BigDecimal east = BigDecimal.ZERO; 157 BigDecimal north = BigDecimal.ZERO; 155 158 156 159 for (Node n : nodes) { -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r6113 r6230 654 654 } 655 655 656 /** 657 * Compute the centroid of nodes 658 * @param nodes Nodes for which the centroid is wanted 659 * @return the centroid of nodes 660 */ 656 661 public static EastNorth getCentroid(List<Node> nodes) { 657 // Compute the centroid of nodes 658 659 BigDecimal area = new BigDecimal(0); 660 BigDecimal north = new BigDecimal(0); 661 BigDecimal east = new BigDecimal(0); 662 663 BigDecimal area = BigDecimal.ZERO; 664 BigDecimal north = BigDecimal.ZERO; 665 BigDecimal east = BigDecimal.ZERO; 662 666 663 667 // See http://en.wikipedia.org/w/index.php?title=Centroid&oldid=294224857#Centroid_of_polygon for the equation used here
Note:
See TracChangeset
for help on using the changeset viewer.