Trait geo::algorithm::haversine_destination::HaversineDestination
[−]
[src]
pub trait HaversineDestination<T: Float> { fn haversine_destination(&self, bearing: T, distance: T) -> Point<T>; }
Returns a new Point using the distance to the existing Point and a bearing for the direction
Required Methods
fn haversine_destination(&self, bearing: T, distance: T) -> Point<T>
Returns a new Point using distance to the existing Point and a bearing for the direction
use geo::Point; use geo::algorithm::haversine_destination::HaversineDestination; let p_1 = Point::<f64>::new(9.177789688110352, 48.776781529534965); let p_2 = p_1.haversine_destination(45., 10000.); assert_eq!(p_2, Point::<f64>::new(9.274410083250379, 48.84033282787534))
Implementors
impl<T> HaversineDestination<T> for Point<T> where
T: Float + FromPrimitive,