Last active
October 4, 2023 18:50
-
-
Save soffes/b085c108f9ad1c804a13 to your computer and use it in GitHub Desktop.
Add Equatable to CLLocationCoordinate2D
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
import CoreLocation | |
extension CLLocationCoordinate2D: Equatable {} | |
public func ==(lhs: CLLocationCoordinate2D, rhs: CLLocationCoordinate2D) -> Bool { | |
return lhs.latitude == rhs.latitude && lhs.longitude == rhs.longitude | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should probably update the float equality to use
.ulpOfOne
instead of==
at some point