pub struct Longitude(/* private fields */);Expand description
Longitude in [-180°, 180°), east positive.
Out-of-range values wrap: adding a longitude difference across the antimeridian is routine.
Implementations§
Source§impl Longitude
impl Longitude
Sourcepub fn from_degrees(value: f64) -> Result<Self>
pub fn from_degrees(value: f64) -> Result<Self>
Longitude from decimal degrees, east positive, wrapped.
§Errors
crate::KernelError::NotFinite for NaN or infinity.
Sourcepub fn from_degrees_minutes(
degrees: u16,
minutes: f64,
hemisphere: EastWest,
) -> Result<Self>
pub fn from_degrees_minutes( degrees: u16, minutes: f64, hemisphere: EastWest, ) -> Result<Self>
Longitude from whole degrees and decimal minutes.
§Errors
crate::KernelError::NotFinite for NaN or infinity.
Sourcepub fn hemisphere(self) -> EastWest
pub fn hemisphere(self) -> EastWest
Hemisphere; Greenwich counts as east.
Sourcepub fn to_degrees_minutes(self) -> (u16, f64, EastWest)
pub fn to_degrees_minutes(self) -> (u16, f64, EastWest)
Whole degrees, decimal minutes and hemisphere.
Sourcepub fn difference_to(self, other: Self) -> Angle
pub fn difference_to(self, other: Self) -> Angle
Shortest signed longitude difference to other, in [-180°, 180°),
east positive.
Trait Implementations§
impl Copy for Longitude
Source§impl PartialOrd for Longitude
impl PartialOrd for Longitude
impl StructuralPartialEq for Longitude
Auto Trait Implementations§
impl Freeze for Longitude
impl RefUnwindSafe for Longitude
impl Send for Longitude
impl Sync for Longitude
impl Unpin for Longitude
impl UnsafeUnpin for Longitude
impl UnwindSafe for Longitude
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more