Created
May 31, 2015 10:37
-
-
Save JFriel/132a67b2a8e6a16f4bfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public getDistance(float latA, float latB, float longA, fload longB){ | |
//Used to find distance between two LatLongs | |
Location locationA = new Location("point A"); | |
locationA.setLatitude(latA); | |
locationA.setLongitude(lngA); | |
Location locationB = new Location("point B"); | |
locationB.setLatitude(latB); | |
locationB.setLongitude(lngB); | |
float distance = locationA.distanceTo(locationB); | |
return distance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment