CGPoint distance(to:) Calculates the straight line distance between two CGPoint. Declaration Swift public func distance(to: CGPoint) -> CGFloat View Source on GitHub