pub trait SpherePoint: GridPoint {
// Required methods
fn from_geographic(latitude: f64, longitude: f64) -> Self;
fn latitude(&self) -> f64;
fn longitude(&self) -> f64;
// Provided method
fn sphere_coordinates(&self) -> (f64, f64) { ... }
}
Expand description
A point on a spherical grid.
Required Methods§
Sourcefn from_geographic(latitude: f64, longitude: f64) -> Self
fn from_geographic(latitude: f64, longitude: f64) -> Self
Gets a sphere point for the specified geographic coordinates.
latitude
- The latitude of the point in radians where 0 is the equator.longitude
- The longitude of the point in radians.
Provided Methods§
Sourcefn sphere_coordinates(&self) -> (f64, f64)
fn sphere_coordinates(&self) -> (f64, f64)
Returns a coordinate containing the latitude and longitude of this point. This returns a point with the X component being the longitude and the Y component being the latitude.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.