summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-05-27 23:11:58 -0700
committerKeith Packard <keithp@keithp.com>2015-05-27 23:11:58 -0700
commitccd557c846eed37328d6799f36e61308bcbb678a (patch)
tree8bcd4ef91cd6b5d0836bfe03b569314a01aa4289
parent756f501593365b80cfa6f7ca871da3291bbde67a (diff)
altoslib: Provide toString method for AltosLatLon
Makes printing them easier. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altoslib/AltosLatLon.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/altoslib/AltosLatLon.java b/altoslib/AltosLatLon.java
index e0fd45e7..dc606ccb 100644
--- a/altoslib/AltosLatLon.java
+++ b/altoslib/AltosLatLon.java
@@ -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;