pub struct LineSegment2 {
pub start: Point2f,
pub end: Point2f,
}Expand description
Data type for line segment2.
Fields§
§start: Point2fThe start value.
end: Point2fThe end value.
Implementations§
Source§impl LineSegment2
impl LineSegment2
Sourcepub fn intersection(self, other: Self) -> Result<Option<LineIntersection2>>
pub fn intersection(self, other: Self) -> Result<Option<LineIntersection2>>
Returns the finite segment intersection, if present.
Trait Implementations§
Source§impl Clone for LineSegment2
impl Clone for LineSegment2
Source§fn clone(&self) -> LineSegment2
fn clone(&self) -> LineSegment2
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LineSegment2
Source§impl Debug for LineSegment2
impl Debug for LineSegment2
Source§impl<'de> Deserialize<'de> for LineSegment2
impl<'de> Deserialize<'de> for LineSegment2
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LineSegment2
impl PartialEq for LineSegment2
Source§fn eq(&self, other: &LineSegment2) -> bool
fn eq(&self, other: &LineSegment2) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LineSegment2
impl Serialize for LineSegment2
impl StructuralPartialEq for LineSegment2
Auto Trait Implementations§
impl Freeze for LineSegment2
impl RefUnwindSafe for LineSegment2
impl Send for LineSegment2
impl Sync for LineSegment2
impl Unpin for LineSegment2
impl UnsafeUnpin for LineSegment2
impl UnwindSafe for LineSegment2
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