Skip to content

Commit

Permalink
Makes GeoCoordinates radiusInMeters(latitudeDelta:) public
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Mueller <mmlr@gmx.net>
  • Loading branch information
mmllr committed Jan 23, 2021
1 parent 0f893ef commit 7d5eb37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/GPXKit/DistanceCalculation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ extension GeoCoordinate {
}

// one degree of latitude is always approximately 111 kilometers (69 miles)
func radiusInMeters(latitudeDelta: Double) -> Double {
public func radiusInMeters(latitudeDelta: Double) -> Double {
let topCentralLat: Double = latitude - latitudeDelta / 2
let topCentralLocation = Coordinate(latitude: topCentralLat, longitude: longitude, elevation: 0)
return distance(to: topCentralLocation)
Expand Down

0 comments on commit 7d5eb37

Please sign in to comment.