altoslib: Provide toString method for AltosLatLon
authorKeith Packard <keithp@keithp.com>
Thu, 28 May 2015 06:11:58 +0000 (23:11 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 28 May 2015 06:11:58 +0000 (23:11 -0700)
Makes printing them easier.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosLatLon.java

index e0fd45e757c4854a12f78448f5b3fa22792c951d..dc606ccb74bb517c5e53bded970937bca073c913 100644 (file)
@@ -27,6 +27,10 @@ public class AltosLatLon {
                return lat == other.lat && lon == other.lon;
        }
 
+       public String toString() {
+               return String.format("%f/%f", lat, lon);
+       }
+
        public AltosLatLon(double lat, double lon) {
                this.lat = lat;
                this.lon = lon;