Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions utils/calendrical_calculations/src/astronomy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ pub struct Location {
pub(crate) longitude: f64,
/// elevation in meters
pub(crate) elevation: f64,
/// UTC timezone offset in fractional days (1 hr = 1.0 / 24.0 day)
/// UTC timezone offset in fractional days (1 hr = 1.0 / 24.0 day),
/// within the range [`MIN_UTC_OFFSET`] (-12.0 / 24.0) to [`MAX_UTC_OFFSET`] (14.0 / 24.0)
pub(crate) utc_offset: f64,
}

Expand Down Expand Up @@ -77,10 +78,10 @@ pub const WINTER: f64 = 270.0;
pub const NEW_MOON_ZERO: Moment = Moment::new(11.458922815770109);

impl Location {
/// Create a location; latitude is from -90 to 90, and longitude is from -180 to 180;
/// Create a location; latitude is from -90 to 90, longitude is from -180 to 180,
/// and `utc_offset` is from [`MIN_UTC_OFFSET`] (-12.0 / 24.0) to [`MAX_UTC_OFFSET`] (14.0 / 24.0);
/// attempting to create a location outside of these bounds will result in a [`LocationOutOfBoundsError`].
#[allow(dead_code)] // TODO: Remove dead_code tag after use
pub(crate) fn try_new(
pub fn try_new(
latitude: f64,
longitude: f64,
elevation: f64,
Expand Down
Loading