[−][src]Struct vrp_core::algorithms::geometry::Point
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]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,