Measurement
extension Measurement where UnitType == UnitLength
-
Initializes a measurement from the given distance.
Declaration
Swift
public init(distance: CLLocationDistance)
Parameters
distance
The distance being measured.
-
The distance in meters.
Declaration
Swift
public var distance: CLLocationDistance { get }
-
Returns a length measurement equivalent to the receiver but converted to the most appropriate unit based on the given locale and rounded based on the unit.
Declaration
Swift
public func localized(into locale: Locale = .nationalizedCurrent) -> Measurement<UnitLength>
Parameters
locale
The locale that determines the chosen unit.