RadianCoordinate2D
public struct RadianCoordinate2D : Sendable
A coordinate pair measured in radians, as opposed to LocationCoordinate2D
, which is measured in degrees of arc.
-
Initializes a coordinate pair located at the given latitude and longitude.
Declaration
Swift
public init(latitude: LocationRadians, longitude: LocationRadians)
Parameters
latitude
The latitude measured in radians.
longitude
The longitude measured in radians.
-
Initializes a coordinate pair measured in radians that is coincident to the given coordinate pair measured in degrees of arc.
Declaration
Swift
public init(_ degreeCoordinate: LocationCoordinate2D)
Parameters
degreeCoordinate
A coordinate pair measured in degrees of arc.
-
Returns direction given two coordinates.
Declaration
Swift
public func direction(to coordinate: RadianCoordinate2D) -> Measurement<UnitAngle>
-
Returns coordinate at a given distance and direction away from coordinate.
Declaration
Swift
public func coordinate(at distance: RadianDistance, facing direction: Measurement<UnitAngle>) -> RadianCoordinate2D
-
Returns the Haversine distance between two coordinates measured in radians.
Declaration
Swift
public func distance(to coordinate: RadianCoordinate2D) -> RadianDistance