Ignore:
Timestamp:
17.04.2008 03:03:28 (4 years ago)
Author:
framm
Message:
  • new extrude mode allows creation of rectangular shapes
  • new AlignInRectangle function
  • additional information in status bar about length, heading, and angle of segment being drawn
  • helper line from last node to mouse cursor (disable with edit.helper-line=false)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java

    r486 r608  
    4141         * Return the squared distance of the northing/easting values between  
    4242         * this and the argument. 
     43         *  
     44         * This method does NOT compute a great circle distance between two  
     45         * locations! 
    4346         * 
    4447         * @param other The other point to calculate the distance to. 
     
    4649         *              regarding to the x/y values. 
    4750         */ 
     51        public double distanceSq(Coordinate other) { 
     52                return (x-other.x)*(x-other.x)+(y-other.y)*(y-other.y); 
     53        } 
     54         
     55        /**  
     56         * Return the distance of the northing/easting values between this and 
     57         * the argument. 
     58         *  
     59         * This method does NOT compute a great circle distance between two  
     60         * locations! 
     61         *  
     62         * @param other The other point to calculate the distance to. 
     63         * @return The square of the distance between this and the other point, 
     64         *              regarding to the x/y values. 
     65         */ 
    4866        public double distance(Coordinate other) { 
    49                 return (x-other.x)*(x-other.x)+(y-other.y)*(y-other.y); 
     67                return Math.sqrt(distanceSq(other)); 
    5068        } 
    5169 
Note: See TracChangeset for help on using the changeset viewer.