#[repr(transparent)]pub struct Vector<T, const N: usize>(pub [T; N]);
Tuple Fields§
§0: [T; N]
Implementations§
source§impl<T> Vector<T, 2>
impl<T> Vector<T, 2>
pub fn unit_right() -> Vector<T, 2>where
T: PolygonScalar,
pub fn ccw_cmp_around(&self, p: &Vector<T, 2>, q: &Vector<T, 2>) -> Orderingwhere
T: PolygonScalar,
pub fn ccw_cmp_around_with(
&self,
z: &Vector<T, 2>,
p: &Vector<T, 2>,
q: &Vector<T, 2>,
) -> Orderingwhere
T: PolygonScalar,
pub fn sort_around(pts: &mut [Vector<T, 2>])where
T: PolygonScalar,
pub fn cmp_along(&self, p: &Point<T, 2>, q: &Point<T, 2>) -> Orderingwhere
T: PolygonScalar,
Trait Implementations§
source§impl<T, const N: usize> AddAssign<&Vector<T, N>> for Point<T, N>
impl<T, const N: usize> AddAssign<&Vector<T, N>> for Point<T, N>
source§fn add_assign(&mut self, other: &Vector<T, N>)
fn add_assign(&mut self, other: &Vector<T, N>)
Performs the
+=
operation. Read moresource§impl<T, const N: usize> AddAssign<Vector<T, N>> for Point<T, N>
impl<T, const N: usize> AddAssign<Vector<T, N>> for Point<T, N>
source§fn add_assign(&mut self, other: Vector<T, N>)
fn add_assign(&mut self, other: Vector<T, N>)
Performs the
+=
operation. Read moresource§impl<T, const N: usize> AddAssign for Vector<T, N>
impl<T, const N: usize> AddAssign for Vector<T, N>
source§fn add_assign(&mut self, other: Vector<T, N>)
fn add_assign(&mut self, other: Vector<T, N>)
Performs the
+=
operation. Read moresource§impl<T, const N: usize> Distribution<Vector<T, N>> for Standardwhere
Standard: Distribution<T>,
impl<T, const N: usize> Distribution<Vector<T, N>> for Standardwhere
Standard: Distribution<T>,
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Vector<T, N>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Vector<T, N>
Generate a random value of
T
, using rng
as the source of randomness.source§fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
Create an iterator that generates random values of
T
, using rng
as
the source of randomness. Read moresource§impl<T: Ord, const N: usize> Ord for Vector<T, N>
impl<T: Ord, const N: usize> Ord for Vector<T, N>
1.21.0 · 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<T: PartialOrd, const N: usize> PartialOrd for Vector<T, N>
impl<T: PartialOrd, const N: usize> PartialOrd for Vector<T, N>
impl<T: Eq, const N: usize> Eq for Vector<T, N>
impl<T, const N: usize> StructuralPartialEq for Vector<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for Vector<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for Vector<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for Vector<T, N>where
T: Send,
impl<T, const N: usize> Sync for Vector<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for Vector<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for Vector<T, N>where
T: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)