Struct glucose::Vector [−][src]
Fields
data: [T; N]
Implementations
impl<T: Scalar> Vector<T, 2>
[src]
pub fn add_fast(&self, rhs: Self) -> Self
[src]
pub fn sub_fast(&self, rhs: Self) -> Self
[src]
pub fn mul_fast(&self, rhs: T) -> Self
[src]
pub fn div_fast(&self, rhs: T) -> Self
[src]
pub fn dot_fast(&self, rhs: Self) -> T
[src]
pub fn wedge(&self, other: Self) -> Bivector2<T>
[src]
impl<T: Scalar> Vector<T, 3>
[src]
pub fn add_fast(&self, rhs: Self) -> Self
[src]
pub fn sub_fast(&self, rhs: Self) -> Self
[src]
pub fn mul_fast(&self, rhs: T) -> Self
[src]
pub fn div_fast(&self, rhs: T) -> Self
[src]
pub fn dot_fast(&self, other: Self) -> T
[src]
impl<T: Scalar> Vector<T, 4>
[src]
pub fn add_fast(&self, rhs: Self) -> Self
[src]
pub fn sub_fast(&self, rhs: Self) -> Self
[src]
pub fn mul_fast(&self, rhs: T) -> Self
[src]
pub fn div_fast(&self, rhs: T) -> Self
[src]
impl<T: Scalar> Vector<T, 5>
[src]
pub fn add_fast(&self, rhs: Self) -> Self
[src]
pub fn sub_fast(&self, rhs: Self) -> Self
[src]
pub fn mul_fast(&self, rhs: T) -> Self
[src]
pub fn div_fast(&self, rhs: T) -> Self
[src]
impl<T: Scalar> Vector<T, 6>
[src]
pub fn add_fast(&self, rhs: Self) -> Self
[src]
pub fn sub_fast(&self, rhs: Self) -> Self
[src]
pub fn mul_fast(&self, rhs: T) -> Self
[src]
pub fn div_fast(&self, rhs: T) -> Self
[src]
impl<T: Scalar> Vector<T, 7>
[src]
pub fn add_fast(&self, rhs: Self) -> Self
[src]
pub fn sub_fast(&self, rhs: Self) -> Self
[src]
pub fn mul_fast(&self, rhs: T) -> Self
[src]
pub fn div_fast(&self, rhs: T) -> Self
[src]
impl<T: Scalar> Vector<T, 8>
[src]
pub fn add_fast(&self, rhs: Self) -> Self
[src]
pub fn sub_fast(&self, rhs: Self) -> Self
[src]
pub fn mul_fast(&self, rhs: T) -> Self
[src]
pub fn div_fast(&self, rhs: T) -> Self
[src]
impl<T, const N: usize> Vector<T, { N }>
[src]
pub const fn new(data: [T; N]) -> Self
[src]
pub const fn len(&self) -> usize
[src]
pub const fn as_array(&self) -> &[T; N]
[src]
pub fn as_array_mut(&mut self) -> &mut [T; N]
[src]
pub fn as_slice(&self) -> &[T]
[src]
pub fn as_slice_mut(&mut self) -> &mut [T]
[src]
pub const fn as_ptr(&self) -> *const T
[src]
pub fn as_mut_ptr(&mut self) -> *mut T
[src]
pub fn as_bytes(&self) -> &[u8]
[src]
impl<T: Copy, const N: usize> Vector<T, { N }>
[src]
impl<T: Scalar, const N: usize> Vector<T, { N }>
[src]
pub fn unit(n: usize) -> Self
[src]
pub fn dot(&self, other: Self) -> T
[src]
pub fn reverse(&mut self)
[src]
pub fn reversed(&self) -> Self
[src]
pub fn map<F: Fn(T) -> T>(&self, f: F) -> Self
[src]
pub fn apply<F: Fn(T) -> T>(&mut self, f: F)
[src]
pub fn zero() -> Self
[src]
constructs a new VecN with all values being 0
pub fn one() -> Self
[src]
constructs a new VecN with all values being 1
impl<T: Scalar + Float + Sum, const N: usize> Vector<T, { N }>
[src]
pub fn magnitude_squared(&self) -> T
[src]
pub fn magnitude(&self) -> T
[src]
pub fn normalize(&mut self)
[src]
pub fn normalized(&self) -> Self
[src]
impl<T: Scalar + Signed, const N: usize> Vector<T, { N }>
[src]
impl<T: Scalar + Two, const N: usize> Vector<T, { N }>
[src]
impl<T: Scalar + Cmp, const N: usize> Vector<T, { N }>
[src]
pub fn clamp(&mut self, min: Self, max: Self)
[src]
pub fn clamped(&self, min: Self, max: Self) -> Self
[src]
returns a VecN' with clamped values without consuming VecN
pub fn max_by_component(&self, other: &Self) -> Self
[src]
returns a new VecN' with each component having the bigger number from either VecN1 or VecN2
pub fn min_by_component(&self, other: &Self) -> Self
[src]
returns a new VecN' with each component having the smaller number from either VecN1 or VecN2
impl<T: Default + Copy, const N: usize> Vector<T, { N }>
[src]
pub fn from_other<const M: usize>(rhs: Vector<T, { M }>) -> Self
[src]
Trait Implementations
impl<T: Scalar, const N: usize> Add<Vector<T, N>> for Vector<T, { N }>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
impl<T: Scalar, const N: usize> AddAssign<Vector<T, N>> for Vector<T, { N }>
[src]
fn add_assign(&mut self, rhs: 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: Display, const N: usize> Display for Vector<T, { N }>
[src]
impl<T: Scalar, const N: usize> Div<T> for Vector<T, { N }>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> Self::Output
[src]
impl<T: Scalar, const N: usize> Div<Vector<T, N>> for Vector<T, { N }>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self::Output
[src]
impl<T: Scalar, const N: usize> DivAssign<T> for Vector<T, { N }>
[src]
fn div_assign(&mut self, rhs: T)
[src]
impl<T: Scalar, const N: usize> DivAssign<Vector<T, N>> for Vector<T, { N }>
[src]
fn div_assign(&mut self, rhs: Self)
[src]
impl<T, const N: usize> From<[T; N]> for Vector<T, { N }>
[src]
impl<T: Copy, const N: usize> From<Matrix<T, N, 1_usize>> for Vector<T, { N }>
[src]
impl<T, const M: usize> From<Vector<T, M>> for Matrix<T, { M }, 1>
[src]
impl<T, const N: usize> Index<usize> for Vector<T, { N }>
[src]
type Output = T
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
impl<T, const N: usize> IndexMut<usize> for Vector<T, { N }>
[src]
impl<T: Scalar, const N: usize> Mul<T> for Vector<T, { N }>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> Self::Output
[src]
impl<T: Scalar, const N: usize, const M: usize> Mul<Vector<T, N>> for Matrix<T, { M }, { N }>
[src]
type Output = Vector<T, { M }>
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector<T, { N }>) -> Self::Output
[src]
impl<T: Scalar, const N: usize> Mul<Vector<T, N>> for Vector<T, { N }>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self::Output
[src]
impl<T: Scalar, const N: usize> MulAssign<T> for Vector<T, { N }>
[src]
fn mul_assign(&mut self, rhs: T)
[src]
impl<T: Scalar, const N: usize> MulAssign<Vector<T, N>> for Vector<T, { N }>
[src]
fn mul_assign(&mut self, rhs: Self)
[src]
impl<T: Scalar, const N: usize> Sub<Vector<T, N>> for Vector<T, { N }>
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
impl<T: Scalar, const N: usize> SubAssign<Vector<T, N>> for Vector<T, { N }>
[src]
fn sub_assign(&mut self, rhs: Self)
[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> 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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,