Skip to content

Gather constants in a dedicated class #59

@rhannequin

Description

@rhannequin

Problem this feature will solve

The code is full or constants. I tried my best so far to avoid magic numbers, but there are still a few of them. Sometimes, magic numbers are extracted into well-named constants, but these constants have to be repeated across files, or fetched from one another creating an unwanted relationship.

Desired solution

Extract and document constants in a dedicated class.

Alternatives considered

Examples:

  • 3600 appears multiple times, most of the time to convert decimal hours into seconds, or the opposite
  • DAYS_PER_JULIAN_CENTURY, currently in Astronoby::Epoch while not completely related
  • SECONDS_PER_HOUR, currently in Astronoby::Angle but probably necessary elsewhere

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestrubyPull requests that update Ruby code

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions