pub enum LineIntersection<U> {
None,
Proper(Point2D<f64, U>),
Improper(Point2D<f64, U>),
Collinear(Point2D<f64, U>),
}Expand description
The result of Line::intersection providing the intersection point between
two line segments, if any.
Variants§
None
The line segments do not intersect.
Proper(Point2D<f64, U>)
The line segments properly intersect at the given point, and are not collinear.
Improper(Point2D<f64, U>)
The line segments improperly intersect and are not collinear, with the endpoint of one line segment landing on the other.
Collinear(Point2D<f64, U>)
The lines are collinear and intersect at the given point (and perhaps infinitely many other points as well).
Implementations§
Source§impl<U> LineIntersection<U>
impl<U> LineIntersection<U>
Sourcepub fn is_improper(&self) -> bool
pub fn is_improper(&self) -> bool
Is this a LineIntersection::Improper?
Sourcepub fn is_collinear(&self) -> bool
pub fn is_collinear(&self) -> bool
Is this a LineIntersection::Collinear?
Trait Implementations§
Source§impl<U: Clone> Clone for LineIntersection<U>
impl<U: Clone> Clone for LineIntersection<U>
Source§fn clone(&self) -> LineIntersection<U>
fn clone(&self) -> LineIntersection<U>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<U: Debug> Debug for LineIntersection<U>
impl<U: Debug> Debug for LineIntersection<U>
Source§impl<U: PartialEq> PartialEq for LineIntersection<U>
impl<U: PartialEq> PartialEq for LineIntersection<U>
impl<U: Copy> Copy for LineIntersection<U>
impl<U> StructuralPartialEq for LineIntersection<U>
Auto Trait Implementations§
impl<U> Freeze for LineIntersection<U>
impl<U> RefUnwindSafe for LineIntersection<U>where
U: RefUnwindSafe,
impl<U> Send for LineIntersection<U>where
U: Send,
impl<U> Sync for LineIntersection<U>where
U: Sync,
impl<U> Unpin for LineIntersection<U>where
U: Unpin,
impl<U> UnsafeUnpin for LineIntersection<U>
impl<U> UnwindSafe for LineIntersection<U>where
U: 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