Changeset 4476 in josm


Ignore:
Timestamp:
2011-09-29T23:07:54+02:00 (13 years ago)
Author:
Don-vip
Message:

LatLon: add a simple way to test validity

File:
1 edited

Legend:

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

    r4423 r4476  
    6464        return lon >= -180d && lon <= 180d;
    6565    }
    66 
     66                     
     67        /**
     68         * Replies true if lat is in the range [-90,90] and lon is in the range [-180,180]
     69         *
     70         * @return true if lat is in the range [-90,90] and lon is in the range [-180,180]
     71         */
     72        public boolean isValid() {
     73                return isValidLat(lat()) && isValidLon(lon());
     74        }
     75       
    6776    /**
    6877     * Replies the coordinate in degrees/minutes/seconds format
Note: See TracChangeset for help on using the changeset viewer.