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
valueThe 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
signThe sign of the final value.
degreesThe integral degree component of the value. Sign is ignored.
arcminutesThe integral arcminute component of the value. Sign is ignored.
arcsecondsThe 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
selfreduced to 0..<360 rangeDeclaration
Swift
public var reduced: Degree { get } -
Returns
selfreduced 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 }
View on GitHub
Install in Dash
Degree Structure Reference