#[repr(transparent)]pub struct Vect<const N: usize, S>(pub [S; N]);Tuple Fields§
§0: [S; N]Implementations§
Source§impl<S: Ring, const N: usize> Vect<N, S>
impl<S: Ring, const N: usize> Vect<N, S>
pub const ZERO: Self
pub const fn axis(i: usize, value: S) -> Self
pub const fn splat(s: S) -> Self
pub fn from_fn<F: Fn(usize) -> S>(f: F) -> Self
pub fn swiz<const M: usize>(self, f: impl Fn([S; N]) -> [S; M]) -> Vect<M, S>
pub fn map<T: Ring>(self, f: impl Fn(S) -> T) -> Vect<N, T>
pub fn scale(self, other: Self) -> Self
pub fn zero_extend<const M: usize>(self, i: usize) -> Vect<M, S>where
S: Sized,
pub fn is_nan(self) -> bool
pub fn is_finite(self) -> bool
Source§impl<S: Field, const N: usize> Vect<N, S>
impl<S: Field, const N: usize> Vect<N, S>
pub fn magn(self) -> S
pub fn normal(self) -> Option<Nrml<N, S>>
pub fn normal_or_zero(self) -> Vect<N, S>
pub fn magn_normal(self) -> Option<(S, Nrml<N, S>)>
pub fn magn_normal_or_zero(self) -> (S, Vect<N, S>)
pub fn divide_by_infinity(self) -> Option<Vect<N, S>>
Trait Implementations§
Source§impl<S: Ring, const N: usize> AddAssign for Vect<N, S>
impl<S: Ring, const N: usize> AddAssign for Vect<N, S>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreimpl<const N: usize, S: Copy> Copy for Vect<N, S>
Source§impl<S: Ring, const N: usize> DivAssign<S> for Vect<N, S>
impl<S: Ring, const N: usize> DivAssign<S> for Vect<N, S>
Source§fn div_assign(&mut self, rhs: S)
fn div_assign(&mut self, rhs: S)
Performs the
/= operation. Read moreimpl<const N: usize, S: Eq> Eq for Vect<N, S>
Source§impl<S: Ring, const N: usize> MulAssign<S> for Vect<N, S>
impl<S: Ring, const N: usize> MulAssign<S> for Vect<N, S>
Source§fn mul_assign(&mut self, rhs: S)
fn mul_assign(&mut self, rhs: S)
Performs the
*= operation. Read moreimpl<const N: usize, S: PartialEq> StructuralPartialEq for Vect<N, S>
Auto Trait Implementations§
impl<const N: usize, S> Freeze for Vect<N, S>
impl<const N: usize, S> RefUnwindSafe for Vect<N, S>where
[S; N]: RefUnwindSafe,
impl<const N: usize, S> Send for Vect<N, S>
impl<const N: usize, S> Sync for Vect<N, S>
impl<const N: usize, S> Unpin for Vect<N, S>
impl<const N: usize, S> UnsafeUnpin for Vect<N, S>where
[S; N]: UnsafeUnpin,
impl<const N: usize, S> UnwindSafe for Vect<N, S>where
[S; N]: 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