NdVector

Struct NdVector 

Source
pub struct NdVector<const N: usize, T> { /* private fields */ }
Expand description

An array of N elements of type T, where T is often a DataValue, which is a trait that defines the basic mathematical operations and properties for the elements of the vector. This means that NdVector can be used to represent vectors in N-dimensional space (or a free module) over T. The vector operations for this type are implemented on a static basis, meaning that the operations are defined for a fixed number of dimensions at compile time without looping over N elements.

Implementations§

Source§

impl<const N: usize, T: Float> NdVector<N, T>

Source

pub fn normalize(self) -> Self

Source

pub fn norm(self) -> T

Trait Implementations§

Source§

impl<T> Add for NdVector<1usize, T>
where T: Add<Output = T> + AddAssign + Copy,

Source§

type Output = NdVector<1, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add for NdVector<2usize, T>
where T: Add<Output = T> + AddAssign + Copy,

Source§

type Output = NdVector<2, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add for NdVector<3usize, T>
where T: Add<Output = T> + AddAssign + Copy,

Source§

type Output = NdVector<3, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add for NdVector<4usize, T>
where T: Add<Output = T> + AddAssign + Copy,

Source§

type Output = NdVector<4, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> AddAssign for NdVector<1usize, T>
where T: AddAssign + Copy,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<T> AddAssign for NdVector<2usize, T>
where T: AddAssign + Copy,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<T> AddAssign for NdVector<3usize, T>
where T: AddAssign + Copy,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<T> AddAssign for NdVector<4usize, T>
where T: AddAssign + Copy,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<const N: usize, T: Clone> Clone for NdVector<N, T>

Source§

fn clone(&self) -> NdVector<N, T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const N: usize, T> Debug for NdVector<N, T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Div<T> for NdVector<1usize, T>
where T: Div<Output = T> + DivAssign + Copy,

Source§

type Output = NdVector<1, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<T> for NdVector<2usize, T>
where T: Div<Output = T> + DivAssign + Copy,

Source§

type Output = NdVector<2, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<T> for NdVector<3usize, T>
where T: Div<Output = T> + DivAssign + Copy,

Source§

type Output = NdVector<3, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<T> for NdVector<4usize, T>
where T: Div<Output = T> + DivAssign + Copy,

Source§

type Output = NdVector<4, T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> DivAssign<T> for NdVector<1usize, T>
where T: DivAssign + Copy,

Source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
Source§

impl<T> DivAssign<T> for NdVector<2usize, T>
where T: DivAssign + Copy,

Source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
Source§

impl<T> DivAssign<T> for NdVector<3usize, T>
where T: DivAssign + Copy,

Source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
Source§

impl<T> DivAssign<T> for NdVector<4usize, T>
where T: DivAssign + Copy,

Source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
Source§

impl<const N: usize, T> From<[T; N]> for NdVector<N, T>

Source§

fn from(data: [T; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize, T> From<NdVector<N, T>> for Value
where [T; N]: Into<Value>,

Source§

fn from(vector: NdVector<N, T>) -> Self

Converts to this type from the input type.
Source§

impl<T> Mul<T> for NdVector<1usize, T>
where T: Mul<Output = T> + MulAssign + Copy,

Source§

type Output = NdVector<1, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<T> for NdVector<2usize, T>
where T: Mul<Output = T> + MulAssign + Copy,

Source§

type Output = NdVector<2, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<T> for NdVector<3usize, T>
where T: Mul<Output = T> + MulAssign + Copy,

Source§

type Output = NdVector<3, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<T> for NdVector<4usize, T>
where T: Mul<Output = T> + MulAssign + Copy,

Source§

type Output = NdVector<4, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> MulAssign<T> for NdVector<1usize, T>
where T: MulAssign + Copy,

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<T> MulAssign<T> for NdVector<2usize, T>
where T: MulAssign + Copy,

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<T> MulAssign<T> for NdVector<3usize, T>
where T: MulAssign + Copy,

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<T> MulAssign<T> for NdVector<4usize, T>
where T: MulAssign + Copy,

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<Data> PartialEq for NdVector<1usize, Data>
where Data: PartialEq,

Source§

fn eq(&self, rhs: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Data> PartialEq for NdVector<2usize, Data>
where Data: PartialEq,

Source§

fn eq(&self, rhs: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Data> PartialEq for NdVector<3usize, Data>
where Data: PartialEq,

Source§

fn eq(&self, rhs: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Data> PartialEq for NdVector<4usize, Data>
where Data: PartialEq,

Source§

fn eq(&self, rhs: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Sub for NdVector<1usize, T>
where T: Sub<Output = T> + SubAssign + Copy,

Source§

type Output = NdVector<1, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub for NdVector<2usize, T>
where T: Sub<Output = T> + SubAssign + Copy,

Source§

type Output = NdVector<2, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub for NdVector<3usize, T>
where T: Sub<Output = T> + SubAssign + Copy,

Source§

type Output = NdVector<3, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub for NdVector<4usize, T>
where T: Sub<Output = T> + SubAssign + Copy,

Source§

type Output = NdVector<4, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> SubAssign for NdVector<1usize, T>
where T: SubAssign + Copy,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<T> SubAssign for NdVector<2usize, T>
where T: SubAssign + Copy,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<T> SubAssign for NdVector<3usize, T>
where T: SubAssign + Copy,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<T> SubAssign for NdVector<4usize, T>
where T: SubAssign + Copy,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl Vector<1> for NdVector<1usize, f32>

Source§

type Component = f32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<1> for NdVector<1usize, f64>

Source§

type Component = f64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<1> for NdVector<1usize, i16>

Source§

type Component = i16

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<1> for NdVector<1usize, i32>

Source§

type Component = i32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<1> for NdVector<1usize, i64>

Source§

type Component = i64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<1> for NdVector<1usize, i8>

Source§

type Component = i8

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<1> for NdVector<1usize, u16>

Source§

type Component = u16

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<1> for NdVector<1usize, u32>

Source§

type Component = u32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<1> for NdVector<1usize, u64>

Source§

type Component = u64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<1> for NdVector<1usize, u8>

Source§

type Component = u8

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, f32>

Source§

type Component = f32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, f64>

Source§

type Component = f64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, i16>

Source§

type Component = i16

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, i32>

Source§

type Component = i32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, i64>

Source§

type Component = i64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, i8>

Source§

type Component = i8

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, u16>

Source§

type Component = u16

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, u32>

Source§

type Component = u32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, u64>

Source§

type Component = u64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<2> for NdVector<2usize, u8>

Source§

type Component = u8

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, f32>

Source§

type Component = f32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, f64>

Source§

type Component = f64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, i16>

Source§

type Component = i16

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, i32>

Source§

type Component = i32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, i64>

Source§

type Component = i64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, i8>

Source§

type Component = i8

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, u16>

Source§

type Component = u16

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, u32>

Source§

type Component = u32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, u64>

Source§

type Component = u64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<3> for NdVector<3usize, u8>

Source§

type Component = u8

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, f32>

Source§

type Component = f32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, f64>

Source§

type Component = f64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, i16>

Source§

type Component = i16

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, i32>

Source§

type Component = i32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, i64>

Source§

type Component = i64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, i8>

Source§

type Component = i8

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, u16>

Source§

type Component = u16

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, u32>

Source§

type Component = u32

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, u64>

Source§

type Component = u64

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl Vector<4> for NdVector<4usize, u8>

Source§

type Component = u8

Source§

fn zero() -> Self

Source§

fn get(&self, index: usize) -> &Self::Component

Source§

fn get_mut(&mut self, index: usize) -> &mut Self::Component

Source§

unsafe fn get_unchecked(&self, index: usize) -> &Self::Component

Source§

unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut Self::Component

Source§

impl<const N: usize, T: Copy> Copy for NdVector<N, T>

Auto Trait Implementations§

§

impl<const N: usize, T> Freeze for NdVector<N, T>
where T: Freeze,

§

impl<const N: usize, T> RefUnwindSafe for NdVector<N, T>
where T: RefUnwindSafe,

§

impl<const N: usize, T> Send for NdVector<N, T>
where T: Send,

§

impl<const N: usize, T> Sync for NdVector<N, T>
where T: Sync,

§

impl<const N: usize, T> Unpin for NdVector<N, T>
where T: Unpin,

§

impl<const N: usize, T> UnwindSafe for NdVector<N, T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Boilerplate for T
where T: Copy + Send + Sync + Debug + PartialEq + 'static,