pub struct Coord(pub f64);Tuple Fields§
§0: f64Implementations§
Source§impl Coord
impl Coord
Sourcepub fn as_deg_min_sec(&self) -> (f64, f64, f64)
pub fn as_deg_min_sec(&self) -> (f64, f64, f64)
Return coordinate as degrees, minutes, seconds
let ang = Coord::from_deg_min_sec((-46., 14., 6.70));
assert_eq!(ang.as_deg_min_sec(), (-46., 14., 6.70));Sourcepub fn from_deg_min_sec((deg, min, sec): (f64, f64, f64)) -> Self
pub fn from_deg_min_sec((deg, min, sec): (f64, f64, f64)) -> Self
let ang = Coord::from_deg_min_sec((-89., 24., 2.2));
assert_eq!((ang.0 * 100_000.).round() / 100_000., -89.40061);Trait Implementations§
Auto Trait Implementations§
impl Freeze for Coord
impl RefUnwindSafe for Coord
impl Send for Coord
impl Sync for Coord
impl Unpin for Coord
impl UnwindSafe for Coord
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