Degree

public struct Degree : NumericType, CustomStringConvertible

The Degree is a unit of angle.

  • The Degree value

    Declaration

    Swift

    public let value: Double
  • Returns a new Degree object.

    Declaration

    Swift

    public init(_ value: Double)

    Parameters

    value

    The value of Degree.

  • Creates a new Degree instance, from sexagesimal components.

    Declaration

    Swift

    public init(_ sign: FloatingPointSign = .plus, _ degrees: Int, _ arcminutes: Int, _ arcseconds: Double)

    Parameters

    sign

    The sign of the final value.

    degrees

    The integral degree component of the value. Sign is ignored.

    arcminutes

    The integral arcminute component of the value. Sign is ignored.

    arcseconds

    The fractional arcsecond component of the value. Sign is ignored.

  • Transform the current Degree in ArcMinutes

    Declaration

    Swift

    public var inArcMinutes: ArcMinute { get }
  • Transform the current Degree in ArcSeconds

    Declaration

    Swift

    public var inArcSeconds: ArcSecond { get }
  • Transform the current Degree in Radians

    Declaration

    Swift

    public var inRadians: Radian { get }
  • Transform the current Degree in Hours

    Declaration

    Swift

    public var inHours: Hour { get }
  • The sexagesimal notation of the Degree.

    Declaration

    Swift

    public var sexagesimal: SexagesimalNotation { get }
  • Returns self reduced to 0..<360 range

    Declaration

    Swift

    public var reduced: Degree { get }
  • Returns self reduced to -180..<180 range (around 0)

    Declaration

    Swift

    public var reduced0: Degree { get }
  • Returns true if self is within circular [from,to] interval. Interval is opened by default. All values reduced to 0..<360 range.

    Declaration

    Swift

    public func isWithinCircularInterval(from: Degree, to: Degree, isIntervalOpen: Bool = true) -> Bool
  • Declaration

    Swift

    public var description: String { get }