Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save codeswimmer/901671 to your computer and use it in GitHub Desktop.

Select an option

Save codeswimmer/901671 to your computer and use it in GitHub Desktop.
Android: calculate the distance from one location to another.
public static final float calculateDistanceTo(Location fromLocation, Location toLocation) {
return fromLocation.distanceTo(toLocation);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment