pub trait HaversineDestination<T: CoordFloat> {
// Required method
fn haversine_destination(&self, bearing: T, distance: T) -> Point<T>;
}
👎Deprecated since 0.29.0: Please use the
Haversine::destination
method from the Destination
trait insteadExpand description
Returns a new Point using the distance to the existing Point and a bearing for the direction
Note: this implementation uses a mean earth radius of 6371.088 km, based on the recommendation of the IUGG
Required Methods§
Sourcefn haversine_destination(&self, bearing: T, distance: T) -> Point<T>
👎Deprecated since 0.29.0: Please use the Haversine::destination
method from the Destination
trait instead
fn haversine_destination(&self, bearing: T, distance: T) -> Point<T>
Haversine::destination
method from the Destination
trait insteadReturns a new Point using distance to the existing Point and a bearing for the direction
§Units
bearing
: degrees, zero degrees is northdistance
: meters
§Examples
use geo::HaversineDestination;
use geo::Point;
use approx::assert_relative_eq;
let p_1 = Point::new(9.177789688110352, 48.776781529534965);
let p_2 = p_1.haversine_destination(45., 10000.);
assert_relative_eq!(p_2, Point::new(9.274409949623548, 48.84033274015048), epsilon = 1e-6)