Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This creates a new `Astronoby::Constants` where are stored constants used across the library. Fixes #59
- Loading branch information
1 parent
c5eb2b8
commit 26b69c8
Showing
19 changed files
with
148 additions
and
91 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
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
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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Astronoby | ||
class Constants | ||
DAYS_PER_JULIAN_CENTURY = 36525.0 | ||
|
||
HOURS_PER_DAY = 24.0 | ||
DEGREES_PER_CIRCLE = 360.0 | ||
RADIANS_PER_CIRCLE = 2 * Math::PI | ||
|
||
SECONDS_PER_MINUTE = 60.0 | ||
MINUTES_PER_HOUR = 60.0 | ||
MINUTES_PER_DEGREE = 60.0 | ||
|
||
SECONDS_PER_HOUR = SECONDS_PER_MINUTE * MINUTES_PER_HOUR | ||
SECONDS_PER_DAY = SECONDS_PER_HOUR * HOURS_PER_DAY | ||
SECONDS_PER_DEGREE = SECONDS_PER_MINUTE * MINUTES_PER_DEGREE | ||
RADIAN_PER_HOUR = Math::PI / 12.0 | ||
|
||
PI_IN_DEGREES = 180.0 | ||
end | ||
end |
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
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
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
Oops, something went wrong.