Trait PointXY

Source
pub trait PointXY:
    Clone
    + Copy
    + Eq
    + Hash {
    // Required methods
    fn angle_to<P: PointXY>(&self, other_pointxy: &P) -> f64;
    fn distance(&self, other_x: f64, other_y: f64) -> f64;
    fn distance_xy<P: PointXY>(&self, other_pointxy: &P) -> f64;
    fn get_x(&self) -> f64;
    fn get_y(&self) -> f64;
}

Required Methods§

Source

fn angle_to<P: PointXY>(&self, other_pointxy: &P) -> f64

The angle, in radians, from this point to the other point

Source

fn distance(&self, other_x: f64, other_y: f64) -> f64

Source

fn distance_xy<P: PointXY>(&self, other_pointxy: &P) -> f64

Source

fn get_x(&self) -> f64

Source

fn get_y(&self) -> f64

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§