pub struct SignedDistance {
pub distance: f64,
pub dot: f64,
}Expand description
A signed distance together with the dot-product alignment used to disambiguate which edge is genuinely closest at corners.
Fields§
§distance: f64§dot: f64Implementations§
Source§impl SignedDistance
impl SignedDistance
pub const fn new(distance: f64, dot: f64) -> Self
Sourcepub fn cmp_key(self, other: SignedDistance) -> Ordering
pub fn cmp_key(self, other: SignedDistance) -> Ordering
Total order on (|distance|, dot) — “closer” sorts as Less.
pub fn is_closer_than(self, other: SignedDistance) -> bool
Trait Implementations§
Source§impl Clone for SignedDistance
impl Clone for SignedDistance
Source§fn clone(&self) -> SignedDistance
fn clone(&self) -> SignedDistance
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 SignedDistance
Source§impl Debug for SignedDistance
impl Debug for SignedDistance
Auto Trait Implementations§
impl Freeze for SignedDistance
impl RefUnwindSafe for SignedDistance
impl Send for SignedDistance
impl Sync for SignedDistance
impl Unpin for SignedDistance
impl UnsafeUnpin for SignedDistance
impl UnwindSafe for SignedDistance
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