Ignore:
Timestamp:
2008-08-06T08:49:51+02:00 (16 years ago)
Author:
stoecker
Message:

some cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/RotateCommand.java

    r630 r748  
    6363                this.objects = AllNodesVisitor.getAllNodes(objects);
    6464                pivot = new Node(new LatLon(0,0));
    65                        
     65                pivot.eastNorth = new EastNorth(0,0);
     66
    6667                for (Node n : this.objects) {
    6768                        MoveCommand.OldState os = new MoveCommand.OldState();
     
    7172                        oldState.put(n, os);
    7273                        pivot.eastNorth = new EastNorth(pivot.eastNorth.east()+os.eastNorth.east(), pivot.eastNorth.north()+os.eastNorth.north());
    73                         pivot.coor = Main.proj.eastNorth2latlon(pivot.eastNorth);
    7474                }
    7575                pivot.eastNorth = new EastNorth(pivot.eastNorth.east()/this.objects.size(), pivot.eastNorth.north()/this.objects.size());
    76                 pivot.coor = Main.proj.eastNorth2latlon(pivot.eastNorth);       
     76                pivot.coor = Main.proj.eastNorth2latlon(pivot.eastNorth);
    7777
    7878                rotationAngle = Math.PI/2;
     
    8989                startAngle = Math.atan2(start.east()-pivot.eastNorth.east(), start.north()-pivot.eastNorth.north());
    9090                double endAngle = Math.atan2(end.east()-pivot.eastNorth.east(), end.north()-pivot.eastNorth.north());
    91                 rotationAngle += startAngle - endAngle;         
     91                rotationAngle += startAngle - endAngle;
    9292                rotateNodes(false);
    9393        }
    94        
     94
    9595        /**
    9696         * Helper for actually rotationg the nodes.
Note: See TracChangeset for help on using the changeset viewer.