[][src]Struct vrp_core::algorithms::geometry::Point

pub struct Point {
    pub x: f64,
    pub y: f64,
}

Represents a point in 2D space.

Fields

x: f64

X value.

y: f64

Y value.

Implementations

impl Point[src]

pub fn new(x: f64, y: f64) -> Self[src]

Creates a new instance of Point.

pub fn distance_to_point(&self, other: &Point) -> f64[src]

Computes distance from given point to other

pub fn distance_to_line(&self, a: &Point, b: &Point) -> f64[src]

Computes distance from line, drawn by points a and b, to the point.

pub fn distance_to_segment(&self, a: &Point, b: &Point) -> f64[src]

Computes distance from segment to the point.

pub fn dot_product(a: &Point, b: &Point, c: &Point) -> f64[src]

Computes the dot product AB . BC

pub fn cross_product(a: &Point, b: &Point, c: &Point) -> f64[src]

Computes the cross product AB x AC

Trait Implementations

impl Clone for Point[src]

impl Debug for Point[src]

impl Eq for Point[src]

impl Hash for Point[src]

impl PartialEq<Point> for Point[src]

Auto Trait Implementations

impl RefUnwindSafe for Point

impl Send for Point

impl Sync for Point

impl Unpin for Point

impl UnwindSafe for Point

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,