Struct mutils::Line [−][src]
Implementations
impl<N: Num> Line<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.
fn add(self, other: Line<N>) -> Self
[src]
impl Add<Line<f32>> for Random
[src]
type Output = Line
The resulting type after applying the +
operator.
fn add(self, Line(start, end): Line) -> Line
[src]
impl Add<Line<f32>> for Transform
[src]
type Output = Line
The resulting type after applying the +
operator.
fn add(self, line: Self::Output) -> Self::Output
[src]
impl<N: Num> Add<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Point<N>) -> Self
[src]
impl Add<Random> for Line
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rnd: Random) -> Self
[src]
impl<N: Num> AddAssign<Line<N>> for Line<N>
[src]
fn add_assign(&mut self, other: Line<N>)
[src]
impl<N: Num> AddAssign<Point<N>> for Line<N>
[src]
fn add_assign(&mut self, other: Point<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.
fn div(self, other: Line<N>) -> Self
[src]
impl<N: Num> Div<N> for Line<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: N) -> Self
[src]
impl<N: Num> Div<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Point<N>) -> Self
[src]
impl<N: Num> Div<Size<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Size<N>) -> Self
[src]
impl<N: Num> DivAssign<Line<N>> for Line<N>
[src]
fn div_assign(&mut self, other: Line<N>)
[src]
impl<N: Num> DivAssign<N> for Line<N>
[src]
fn div_assign(&mut self, other: N)
[src]
impl<N: Num> DivAssign<Point<N>> for Line<N>
[src]
fn div_assign(&mut self, other: Point<N>)
[src]
impl<N: Num> DivAssign<Size<N>> for Line<N>
[src]
fn div_assign(&mut self, other: Size<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.
fn mul(self, other: Line<N>) -> Self
[src]
impl<N: Num> Mul<N> for Line<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: N) -> Self
[src]
impl<N: Num> Mul<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Point<N>) -> Self
[src]
impl<N: Num> Mul<Size<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Size<N>) -> Self
[src]
impl<N: Num> MulAssign<Line<N>> for Line<N>
[src]
fn mul_assign(&mut self, other: Line<N>)
[src]
impl<N: Num> MulAssign<N> for Line<N>
[src]
fn mul_assign(&mut self, other: N)
[src]
impl<N: Num> MulAssign<Point<N>> for Line<N>
[src]
fn mul_assign(&mut self, other: Point<N>)
[src]
impl<N: Num> MulAssign<Size<N>> for Line<N>
[src]
fn mul_assign(&mut self, other: Size<N>)
[src]
impl<N: Num + Signed> Neg for Line<N>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
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.
fn rem(self, other: Line<N>) -> Self
[src]
impl<N: Num> Rem<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, other: Point<N>) -> Self
[src]
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.
fn sub(self, other: Line<N>) -> Self
[src]
impl Sub<Line<f32>> for Random
[src]
type Output = Line
The resulting type after applying the -
operator.
fn sub(self, Line(start, end): Line) -> Line
[src]
impl<N: Num> Sub<Point<N>> for Line<N>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Point<N>) -> Self
[src]
impl<N: Num> SubAssign<Line<N>> for Line<N>
[src]
fn sub_assign(&mut self, other: Line<N>)
[src]
impl<N: Num> SubAssign<Point<N>> for Line<N>
[src]
fn sub_assign(&mut self, other: Point<N>)
[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for Line<N> where
N: RefUnwindSafe,
[src]
N: RefUnwindSafe,
impl<N> Send for Line<N> where
N: Send,
[src]
N: Send,
impl<N> Sync for Line<N> where
N: Sync,
[src]
N: Sync,
impl<N> Unpin for Line<N> where
N: Unpin,
[src]
N: Unpin,
impl<N> UnwindSafe for Line<N> where
N: UnwindSafe,
[src]
N: UnwindSafe,
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,
pub 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, 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]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,