Add getLatAsDouble() and getLonAsDouble() to Point and Location.

This commit is contained in:
Andreas Schildbach 2015-09-16 23:03:12 +02:00
parent be258fda6b
commit 29d853202c
2 changed files with 20 additions and 0 deletions

View file

@ -115,6 +115,16 @@ public final class Location implements Serializable
return lat != 0 || lon != 0;
}
public double getLatAsDouble()
{
return lat / 1E6;
}
public double getLonAsDouble()
{
return lon / 1E6;
}
public final boolean hasName()
{
return name != null;

View file

@ -41,6 +41,16 @@ public final class Point implements Serializable
return new Point((int) Math.round(lat * 1E6), (int) Math.round(lon * 1E6));
}
public double getLatAsDouble()
{
return lat / 1E6;
}
public double getLonAsDouble()
{
return lon / 1E6;
}
@Override
public boolean equals(final Object o)
{