Struct mutils::Line[][src]

pub struct Line<N: Num = f32>(pub Point<N>, pub Point<N>);

Implementations

impl<N: Num> Line<N>[src]

pub fn start(self) -> Point<N>[src]

pub fn end(self) -> Point<N>[src]

impl Line[src]

pub fn midpoint(self) -> Point[src]

pub fn x_diff(self) -> f32[src]

pub fn y_diff(self) -> f32[src]

pub fn angle(self) -> f32[src]

Returns the atan2( y dist, x dist )

pub fn hypot(self) -> f32[src]

pub fn left_x(self) -> f32[src]

pub fn right_x(self) -> f32[src]

pub fn bottom_y(self) -> f32[src]

pub fn top_y(self) -> f32[src]

Trait Implementations

impl<N: Num> Add<Line<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Line<f32>> for Random[src]

type Output = Line

The resulting type after applying the + operator.

impl Add<Line<f32>> for Transform[src]

type Output = Line

The resulting type after applying the + operator.

impl<N: Num> Add<Point<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Random> for Line[src]

type Output = Self

The resulting type after applying the + operator.

impl<N: Num> AddAssign<Line<N>> for Line<N>[src]

impl<N: Num> AddAssign<Point<N>> for Line<N>[src]

impl<N: Clone + Num> Clone for Line<N>[src]

impl<N: Copy + Num> Copy for Line<N>[src]

impl<N: Debug + Num> Debug for Line<N>[src]

impl<N: Num> Div<Line<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the / operator.

impl<N: Num> Div<N> for Line<N>[src]

type Output = Self

The resulting type after applying the / operator.

impl<N: Num> Div<Point<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the / operator.

impl<N: Num> Div<Size<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the / operator.

impl<N: Num> DivAssign<Line<N>> for Line<N>[src]

impl<N: Num> DivAssign<N> for Line<N>[src]

impl<N: Num> DivAssign<Point<N>> for Line<N>[src]

impl<N: Num> DivAssign<Size<N>> for Line<N>[src]

impl<N: Num> From<(Point<N>, Point<N>)> for Line<N>[src]

impl<N: Num> Into<(Point<N>, Point<N>)> for Line<N>[src]

impl<N: Num> Mul<Line<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the * operator.

impl<N: Num> Mul<N> for Line<N>[src]

type Output = Self

The resulting type after applying the * operator.

impl<N: Num> Mul<Point<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the * operator.

impl<N: Num> Mul<Size<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the * operator.

impl<N: Num> MulAssign<Line<N>> for Line<N>[src]

impl<N: Num> MulAssign<N> for Line<N>[src]

impl<N: Num> MulAssign<Point<N>> for Line<N>[src]

impl<N: Num> MulAssign<Size<N>> for Line<N>[src]

impl<N: Num + Signed> Neg for Line<N>[src]

type Output = Self

The resulting type after applying the - operator.

impl<N: PartialEq + Num> PartialEq<Line<N>> for Line<N>[src]

impl<N: Num> Rem<Line<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the % operator.

impl<N: Num> Rem<Point<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the % operator.

impl<N: Num> StructuralPartialEq for Line<N>[src]

impl<N: Num> Sub<Line<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<Line<f32>> for Random[src]

type Output = Line

The resulting type after applying the - operator.

impl<N: Num> Sub<Point<N>> for Line<N>[src]

type Output = Self

The resulting type after applying the - operator.

impl<N: Num> SubAssign<Line<N>> for Line<N>[src]

impl<N: Num> SubAssign<Point<N>> for Line<N>[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for Line<N> where
    N: RefUnwindSafe
[src]

impl<N> Send for Line<N> where
    N: Send
[src]

impl<N> Sync for Line<N> where
    N: Sync
[src]

impl<N> Unpin for Line<N> where
    N: Unpin
[src]

impl<N> UnwindSafe for Line<N> where
    N: UnwindSafe
[src]

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, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[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.