Make ZodiacCoordinate init public (#18)

This commit is contained in:
Vincent Smithers 2022-12-26 09:56:05 -08:00 committed by GitHub
parent 20a97e6c33
commit 9d9ac62383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -22,17 +22,17 @@ public struct ZodiacCoordinate: Codable {
/// The second value for the degree.
public var second: Double { minute.truncatingRemainder(dividingBy: 1) * 60 }
/// An internal initializer for creating a `ZodiacCoordinate`.
/// An initializer for creating a `ZodiacCoordinate`.
/// - Parameter value: Must be between 0-360.
init(value: Double) {
public init(value: Double) {
self.value = value
}
/// An internal initializer for creating a `ZodiacCoordinate` with an offset.
/// An initializer for creating a `ZodiacCoordinate` with an offset.
/// - Parameters:
/// - value: Must be between 0-360.
/// - offset: The offset to set.
init(value: Double, offset: Double) {
public init(value: Double, offset: Double) {
self.value = value - offset >= 0 ? value - offset : 360.0 + value - offset
}
}