Struct glucose::Vector[][src]

#[repr(C)]pub struct Vector<T, const N: usize> {
    pub data: [T; N],
}

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]

pub fn broadcast(value: T) -> Self[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]

pub fn abs(&mut self)[src]

pub fn abs_copy(&self) -> Self[src]

impl<T: Scalar + Two, const N: usize> Vector<T, { N }>[src]

pub fn reflect(&mut self, normal: Self)[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.

impl<T: Scalar, const N: usize> AddAssign<Vector<T, N>> for Vector<T, { N }>[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.

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.

impl<T: Scalar, const N: usize> DivAssign<T> for Vector<T, { N }>[src]

impl<T: Scalar, const N: usize> DivAssign<Vector<T, N>> for Vector<T, { N }>[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.

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.

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.

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.

impl<T: Scalar, const N: usize> MulAssign<T> for Vector<T, { N }>[src]

impl<T: Scalar, const N: usize> MulAssign<Vector<T, N>> for Vector<T, { N }>[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.

impl<T: Scalar, const N: usize> SubAssign<Vector<T, N>> for Vector<T, { N }>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.