AstronomicalUnit

public struct AstronomicalUnit : NumericType, CustomStringConvertible

The AstronomicalUnit is a unit of distance.

  • The AstronomicalUnit value

    Declaration

    Swift

    public let value: Double
  • Creates a new AstronomicalUnit instance.

    Declaration

    Swift

    public init(_ value: Double)

    Parameters

    value

    The value of AstronomicalUnit.

  • Transform the current AstronomicalUnit in Parsecs

    Declaration

    Swift

    public var inParsecs: Parsec { get }
  • Transform the current AstronomicalUnit in kilometers

    Declaration

    Swift

    public var inKilometers: Kilometer { get }
  • Transform the current AstronomicalUnit in Meters

    Declaration

    Swift

    public var inMeters: Meter { get }
  • Transform the current AstronomicalUnit in light-years

    Declaration

    Swift

    public var inLightYears: Double { get }
  • Returns the equatorial horizontal parallax value corresponding to the current distance of a solar system body, used in the difference between the toppocentric (as seen from the observer’s place) and geocentric coordinates (as seen from the Earth center).

    Declaration

    Swift

    public func equatorialHorizontalParallax() -> ArcSecond

    Return Value

    The parallax value.

  • Declaration

    Swift

    public var description: String { get }