Skip to content

Instantly share code, notes, and snippets.

@soffes
soffes / CLLocationCoordinate2D+Equatable.swift
Last active September 11, 2024 14:15
Add Equatable to CLLocationCoordinate2D
import CoreLocation
extension CLLocationCoordinate2D: Equatable {}
public func ==(lhs: CLLocationCoordinate2D, rhs: CLLocationCoordinate2D) -> Bool {
return lhs.latitude == rhs.latitude && lhs.longitude == rhs.longitude
}