Trait Bearing

Source
pub trait Bearing<F: CoordFloat> {
    // Required method
    fn bearing(origin: Point<F>, destination: Point<F>) -> F;
}
Expand description

Calculate the bearing between two points.

Required Methods§

Source

fn bearing(origin: Point<F>, destination: Point<F>) -> F

Calculate the bearing from origin to destination in degrees.

See specific implementations for details.

§Units
  • origin, destination: Point where the units of x/y depend on the trait implementation.
  • returns: degrees, where: North: 0°, East: 90°, South: 180°, West: 270°

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.

Implementors§