I want to make it so that it will show the amount of distance between two CLLocation coordinates. Is there someway to do this without a complex math formula? If there isn\'t
Swift 4.1
import CoreLocation
//My location
let myLocation = CLLocation(latitude: 59.244696, longitude: 17.813868)
//My buddy's location
let myBuddysLocation = CLLocation(latitude: 59.326354, longitude: 18.072310)
//Measuring my distance to my buddy's (in km)
let distance = myLocation.distance(from: myBuddysLocation) / 1000
//Display the result in km
print(String(format: "The distance to my buddy is %.01fkm", distance))