pub struct ClosestPoints<const N: usize> {
pub first: [f64; N],
pub second: [f64; N],
pub first_parameter: f64,
pub second_parameter: f64,
pub distance: f64,
}Expand description
Two closest witnesses, with finite f64 coordinates and distance.
Query functions return N = 2 or N = 3. For a point query, first is the
supplied point and first_parameter is zero. Otherwise both parameters
describe their respective ordered start/end inputs. See the module recipe.
Fields§
§first: [f64; N]Point on the first segment (or the query point).
second: [f64; N]Point on the second segment.
first_parameter: f64Fraction along the first segment, in 0..=1.
second_parameter: f64Fraction along the second segment, in 0..=1.
distance: f64Euclidean distance between first and second, in input world units.
Trait Implementations§
Source§impl<const N: usize> Clone for ClosestPoints<N>
impl<const N: usize> Clone for ClosestPoints<N>
Source§fn clone(&self) -> ClosestPoints<N>
fn clone(&self) -> ClosestPoints<N>
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<const N: usize> Debug for ClosestPoints<N>
impl<const N: usize> Debug for ClosestPoints<N>
Source§impl<const N: usize> PartialEq for ClosestPoints<N>
impl<const N: usize> PartialEq for ClosestPoints<N>
impl<const N: usize> Copy for ClosestPoints<N>
impl<const N: usize> StructuralPartialEq for ClosestPoints<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for ClosestPoints<N>
impl<const N: usize> RefUnwindSafe for ClosestPoints<N>
impl<const N: usize> Send for ClosestPoints<N>
impl<const N: usize> Sync for ClosestPoints<N>
impl<const N: usize> Unpin for ClosestPoints<N>
impl<const N: usize> UnwindSafe for ClosestPoints<N>
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