[][src]Struct arcs::primitives::Line

pub struct Line {
    pub start: Vector,
    pub end: Vector,
}

Fields

start: Vectorend: Vector

Methods

impl Line[src]

pub const fn new(start: Vector, end: Vector) -> Self[src]

pub fn displacement(&self) -> Vector[src]

pub fn direction(&self) -> Vector[src]

pub fn length(self) -> f64[src]

pub fn perpendicular_distance_to(self, point: Vector) -> f64[src]

Trait Implementations

impl Approximate for Line[src]

type Iter = Chain<Once<Vector>, Once<Vector>>

impl Bounded for Line[src]

impl Clone for Line[src]

impl ClosestPoint for Line[src]

impl Copy for Line[src]

impl Debug for Line[src]

impl Length for Line[src]

fn length(&self) -> f64[src]

Calculates the length of the line.

let line = Line::new(Vector::zero(), Vector::new(5.0, 0.0));

assert_eq!(line.length(), 5.0);

impl PartialEq<Line> for Line[src]

impl Scale for Line[src]

impl StructuralPartialEq for Line[src]

impl Translate for Line[src]

Auto Trait Implementations

impl RefUnwindSafe for Line

impl Send for Line

impl Sync for Line

impl Unpin for Line

impl UnwindSafe for Line

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> Event for T where
    T: Send + Sync + 'static, 

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

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

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

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

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<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.