pub struct ExactPoint2 { /* private fields */ }Expand description
A planar point with exact rational coordinates.
Either an input endpoint, which is a pair of doubles, or a crossing of
two segments, (x / w, y / w) with dyadic x, y and w > 0.
Equality and order are exact; the order is lexicographic (x, then
y), which is the sweep order.
Implementations§
Source§impl ExactPoint2
impl ExactPoint2
Sourcepub fn from_homogeneous(x: Dyadic, y: Dyadic, w: Dyadic) -> Option<ExactPoint2>
pub fn from_homogeneous(x: Dyadic, y: Dyadic, w: Dyadic) -> Option<ExactPoint2>
The point (x / w, y / w), or None when w is zero.
Sourcepub fn as_input(&self) -> Option<DVec2>
pub fn as_input(&self) -> Option<DVec2>
The input endpoint this point is, when it is one.
Every point the sweep reports that is not a proper crossing is an input endpoint, and then these are exactly its doubles.
Sourcepub fn homogeneous(&self) -> (Dyadic, Dyadic, Dyadic)
pub fn homogeneous(&self) -> (Dyadic, Dyadic, Dyadic)
Exact homogeneous coordinates (x, y, w) with w > 0.
Trait Implementations§
Source§impl Clone for ExactPoint2
impl Clone for ExactPoint2
Source§fn clone(&self) -> ExactPoint2
fn clone(&self) -> ExactPoint2
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 moreSource§impl Debug for ExactPoint2
impl Debug for ExactPoint2
impl Eq for ExactPoint2
Source§impl Ord for ExactPoint2
impl Ord for ExactPoint2
Source§fn cmp(&self, other: &ExactPoint2) -> Ordering
fn cmp(&self, other: &ExactPoint2) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ExactPoint2
impl PartialEq for ExactPoint2
Source§impl PartialOrd for ExactPoint2
impl PartialOrd for ExactPoint2
Auto Trait Implementations§
impl Freeze for ExactPoint2
impl RefUnwindSafe for ExactPoint2
impl Send for ExactPoint2
impl Sync for ExactPoint2
impl Unpin for ExactPoint2
impl UnsafeUnpin for ExactPoint2
impl UnwindSafe for ExactPoint2
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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