pub struct Line<T> {
pub s: Point<T>,
pub e: Point<T>,
}
Expand description
A lines segment of finite length, determined by a starting points and an ending points.
Fields§
§s: Point<T>
Start points of the lines segment.
e: Point<T>
End points of the lines segment.
Implementations§
Trait Implementations§
Source§impl<T> EuclideanDistance<T, Line<T>> for Point<T>where
T: Float,
impl<T> EuclideanDistance<T, Line<T>> for Point<T>where
T: Float,
fn euclidean_distance(&self, rhs: &Line<T>) -> T
Source§fn euclidean_squared(&self, rhs: &Line<T>) -> T
fn euclidean_squared(&self, rhs: &Line<T>) -> T
It is especially suitable when only the length needs to be compared Read more
Source§impl<T> Projective<T> for Line<T>where
T: Float,
impl<T> Projective<T> for Line<T>where
T: Float,
impl<T> Copy for Line<T>where
T: Copy,
impl<T> Eq for Line<T>where
T: Eq,
impl<T> StructuralPartialEq for Line<T>
Auto Trait Implementations§
impl<T> Freeze for Line<T>where
T: Freeze,
impl<T> RefUnwindSafe for Line<T>where
T: RefUnwindSafe,
impl<T> Send for Line<T>where
T: Send,
impl<T> Sync for Line<T>where
T: Sync,
impl<T> Unpin for Line<T>where
T: Unpin,
impl<T> UnwindSafe for Line<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more