pub struct Location {
pub latitude: f64,
pub longitude: f64,
}Fields§
§latitude: f64§longitude: f64Implementations§
Source§impl Location
impl Location
pub fn from(latitude: f64, longitude: f64) -> Self
Sourcepub fn from_normalized(latitude: f64, longitude: f64) -> Self
pub fn from_normalized(latitude: f64, longitude: f64) -> Self
Creates a new Location with normalized coordinates. Latitude is clamped/wrapped to [-90, 90] with proper pole crossing handling. Longitude is wrapped to [-180, 180].
pub fn distance(&self, other: &Location) -> Distance
pub fn add(&self, distance: &Distance, direction: Direction) -> Self
pub fn estimate_distance(&self, other: &Location) -> f64
Trait Implementations§
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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