mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-21 09:49:51 +00:00
Add getLatAsDouble() and getLonAsDouble() to Point and Location.
This commit is contained in:
parent
be258fda6b
commit
29d853202c
2 changed files with 20 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue