Struct simple_vectors::Vector [−][src]
Implementations
impl<T, const N: usize> Vector<T, N>
[src]
Trait Implementations
impl<T, const N: usize> Add<Vector<T, N>> for Vector<T, N> where
T: Add<Output = T> + Copy,
[src]
T: Add<Output = T> + Copy,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl<T, const N: usize> AddAssign<Vector<T, N>> for Vector<T, N> where
T: AddAssign + Copy,
[src]
T: AddAssign + Copy,
fn add_assign(&mut self, other: Self)
[src]
impl<T: Real, const N: usize, const I: usize> Basis<I> for Vector<T, N>
[src]
fn unit_basis() -> Self
[src]
fn basis_of(magnitude: T) -> Self
[src]
fn basis(&self) -> Self::Scalar
[src]
fn basis_mut(&mut self) -> &mut Self::Scalar
[src]
pub fn with_basis(self, magnitude: Self::Scalar) -> Self
[src]
impl<T: Clone, const N: usize> Clone for Vector<T, N>
[src]
impl<T: Copy, const N: usize> Copy for Vector<T, N>
[src]
impl<T: Debug, const N: usize> Debug for Vector<T, N>
[src]
impl<T: Default + Copy, const N: usize> Default for Vector<T, N>
[src]
impl<T, const N: usize> Div<T> for Vector<T, N> where
T: Div<Output = T> + Copy,
[src]
T: Div<Output = T> + Copy,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: T) -> Self
[src]
impl<T, const N: usize> DivAssign<T> for Vector<T, N> where
T: DivAssign + Copy,
[src]
T: DivAssign + Copy,
fn div_assign(&mut self, other: T)
[src]
impl<T: Real, const N: usize> DotProduct<Vector<T, N>> for Vector<T, N>
[src]
impl<T: Eq, const N: usize> Eq for Vector<T, N>
[src]
impl<I, T, const N: usize> Index<I> for Vector<T, N> where
[T; N]: Index<I>,
[src]
[T; N]: Index<I>,
type Output = <[T; N] as Index<I>>::Output
The returned type after indexing.
fn index(&self, index: I) -> &Self::Output
[src]
impl<I, T, const N: usize> IndexMut<I> for Vector<T, N> where
[T; N]: IndexMut<I>,
[src]
[T; N]: IndexMut<I>,
impl<T: Real, const N: usize> InnerSpace for Vector<T, N>
[src]
pub fn magnitude2(self) -> Self::Scalar
[src]
pub fn magnitude(self) -> Self::Scalar
[src]
pub fn normalize(self) -> Self
[src]
pub fn angle(self, other: Self) -> Self::Scalar
[src]
pub fn distance(self, other: Self) -> Self::Scalar
[src]
pub fn with_magnitude(self, magnitude: Self::Scalar) -> Self
[src]
pub fn with_direction(self, dir: Self) -> Self
[src]
pub fn query_axis(self, dir: Self) -> Self::Scalar
[src]
pub fn normalized_project(self, dir: Self) -> Self
[src]
pub fn project(self, dir: Self) -> Self
[src]
pub fn normalized_reject(self, dir: Self) -> Self
[src]
pub fn reject(self, dir: Self) -> Self
[src]
pub fn normalized_reflect(self, dir: Self) -> Self
[src]
pub fn reflect(self, dir: Self) -> Self
[src]
impl<'a, T, const N: usize> Into<&'a [T; N]> for &'a Vector<T, N>
[src]
impl<T, const N: usize> Into<[T; N]> for Vector<T, N>
[src]
impl<T, const N: usize> Mul<T> for Vector<T, N> where
T: Mul<Output = T> + Copy,
[src]
T: Mul<Output = T> + Copy,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Self
[src]
impl<T, const N: usize> Mul<Vector<T, N>> for Vector<T, N> where
T: Add<Output = T> + Mul<Output = T> + Zero + Copy,
[src]
T: Add<Output = T> + Mul<Output = T> + Zero + Copy,
type Output = T
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> T
[src]
impl<T, const N: usize> MulAssign<T> for Vector<T, N> where
T: MulAssign + Copy,
[src]
T: MulAssign + Copy,
fn mul_assign(&mut self, other: T)
[src]
impl<T, const N: usize> Neg for Vector<T, N> where
T: Neg<Output = T> + Copy,
[src]
T: Neg<Output = T> + Copy,
impl<T: PartialEq, const N: usize> PartialEq<Vector<T, N>> for Vector<T, N>
[src]
impl<T, const N: usize> StructuralEq for Vector<T, N>
[src]
impl<T, const N: usize> StructuralPartialEq for Vector<T, N>
[src]
impl<T, const N: usize> Sub<Vector<T, N>> for Vector<T, N> where
T: Sub<Output = T> + Copy,
[src]
T: Sub<Output = T> + Copy,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
impl<T, const N: usize> SubAssign<Vector<T, N>> for Vector<T, N> where
T: SubAssign + Copy,
[src]
T: SubAssign + Copy,
fn sub_assign(&mut self, other: Self)
[src]
impl<T: Real, const N: usize> VectorSpace for Vector<T, N>
[src]
type Scalar = T
The scalar type of the vector space.
pub fn lerp(self, other: Self, amount: Self::Scalar) -> Self
[src]
impl<T: Zero + Copy, const N: usize> Zero for Vector<T, N>
[src]
Auto Trait Implementations
impl<T, const N: usize> RefUnwindSafe for Vector<T, N> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, const N: usize> Send for Vector<T, N> where
T: Send,
T: Send,
impl<T, const N: usize> Sync for Vector<T, N> where
T: Sync,
T: Sync,
impl<T, const N: usize> Unpin for Vector<T, N> where
T: Unpin,
T: Unpin,
impl<T, const N: usize> UnwindSafe for Vector<T, N> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Bases for T where
T: VectorSpace,
[src]
T: VectorSpace,
pub fn unit_bases<const I: usize>() -> Self where
Self: Basis<I>,
[src]
Self: Basis<I>,
pub fn bases_of<const I: usize>(magnitude: Self::Scalar) -> Self where
Self: Basis<I>,
[src]
Self: Basis<I>,
pub fn bases<const I: usize>(&self) -> Self::Scalar where
Self: Basis<I>,
[src]
Self: Basis<I>,
pub fn bases_mut<const I: usize>(&mut self) -> &mut Self::Scalar where
Self: Basis<I>,
[src]
Self: Basis<I>,
pub fn with_bases<const I: usize>(self, magnitude: Self::Scalar) -> Self where
Self: Basis<I>,
[src]
Self: Basis<I>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,