Struct tree_layout::Line
source · 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> PartialEq for Line<T>where
T: PartialEq,
impl<T> PartialEq for Line<T>where T: PartialEq,
source§impl<T> Projective<T> for Line<T>where
T: Float,
impl<T> Projective<T> for Line<T>where T: Float,
§fn translate_x(&mut self, x: &T)
fn translate_x(&mut self, x: &T)
Transform by length $\delta x$. Read more
§fn translate_y(&mut self, y: &T)
fn translate_y(&mut self, y: &T)
Transform by length $\delta y$. Read more
impl<T> Copy for Line<T>where T: Copy,
impl<T> Eq for Line<T>where T: Eq,
impl<T> StructuralEq for Line<T>
impl<T> StructuralPartialEq for Line<T>
Auto Trait Implementations§
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