-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anthony Templeton
committed
Jun 27, 2024
1 parent
a9a46b8
commit 905776f
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const std = @import("std"); | ||
|
||
pub const Equatorial_Coordinate_System = struct { | ||
declination: Declination, | ||
right_ascension: Right_Ascension, | ||
|
||
const Self = @This(); | ||
|
||
pub fn new(declination: Declination, right_ascension: Right_Ascension) Self { | ||
return .{ .declination = declination, .right_ascension = right_ascension }; | ||
} | ||
}; | ||
|
||
pub const Declination = struct { | ||
degrees: u8, | ||
arcminutes: u8, | ||
arcseconds: f32, | ||
|
||
const Self = @This(); | ||
|
||
pub fn new(degree: ?u8, arcminutes: ?u8, arcseconds: ?f32) Self { | ||
return .{ .degree = degree orelse 0, .arcminutes = arcminutes orelse 0.0, .arcseconds = arcseconds orelse 0.0 }; | ||
} | ||
}; | ||
|
||
pub const Right_Ascension = struct { | ||
hours: u8, | ||
minutes: u8, | ||
seconds: f32, | ||
|
||
const Self = @This(); | ||
|
||
pub fn new(hours: ?u8, minutes: ?u8, seconds: ?f32) Self { | ||
return .{ .hours = hours orelse 0, .minutes = minutes orelse 0, .seconds = seconds orelse 0.0 }; | ||
} | ||
}; |