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
Values which are correctly calculated | |
Source : CLLocationCoordinate2D(latitude: 42.523261499999997, longitude: 27.432378400000001) | |
Destination: CLLocationCoordinate2D(latitude: 50.418807999999999, longitude: 30.490086000000002) | |
Bearing --> 13.8377869254834 | |
Source : CLLocationCoordinate2D(latitude: 40.852899700000002, longitude: 14.332884999999999) | |
Destination: CLLocationCoordinate2D(latitude: 50.761059600000003, longitude: 8.1405194000000005) |
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
Values which are correctly calculated | |
//1 | |
Source : CLLocationCoordinate2D(latitude: 39.982261000000001, longitude: 32.555914899999998) | |
Destination: CLLocationCoordinate2D(latitude: 50.761059600000003, longitude: 8.1405194000000005) | |
Bearing --> 3.70469770806337 | |
//2 | |
Source : CLLocationCoordinate2D(latitude: -26.073920000000001, longitude: 28.235959999999999) | |
Destination: CLLocationCoordinate2D(latitude: 40.852899700000002, longitude: 14.332884999999999) |
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
//: A MapKit based Playground | |
import MapKit | |
import PlaygroundSupport | |
var points: [Any] = [] | |
class MapDelegate: NSObject, MKMapViewDelegate { | |
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { | |
guard let myAnnotation = annotation as? MKPointAnnotation else { |
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
// String to compress | |
let stringtoCompress = "AAABBACC" | |
// Empty string to store compressed value | |
var compressedString = "" | |
// Store the letter count to append in compressed string | |
var letterCountStored:Int | |
//Initially letterCountStored is set to 0 |