Vector

Struct Vector 

Source
pub struct Vector<T, const DIM: usize> { /* private fields */ }

Implementations§

Source§

impl<T> Vector<T, 4>

Source

pub const fn new4(x: T, y: T, z: T, w: T) -> Self

Create a new 4D vector

let v = Vector::new4(1, 2, 3, 4);

assert_eq!(v.dimensions(), 4);
Source§

impl<T> Vector<T, 3>

Source

pub const fn new3(x: T, y: T, z: T) -> Self

Create a new 2D vector

let v = Vector::new3(1, 2, 3);

assert_eq!(v.dimensions(), 3);
Source§

impl<T> Vector<T, 2>

Source

pub const fn new2(x: T, y: T) -> Self

Create a new 2D vector

let v = Vector::new2(1, 2);

assert_eq!(v.dimensions(), 2);
Source§

impl<T, const DIM: usize> Vector<T, DIM>

Source

pub fn new(value: impl Into<Vector<T, DIM>>) -> Self

Create a new Vector


let v = Vector::new([1, 2]);
Source

pub fn repeat(value: T) -> Self
where T: Clone,

Source

pub fn try_new(i: impl IntoIterator<Item = T>) -> Option<Self>

Try to create a vector from the elements provided (in the form of any type which implements IntoIterator). Returns None when the number of items in the iterator do no much the dimension of the desired vector.


assert_eq!(Vector::try_new(vec![1, 2]), Some(Vector::new2(1, 2)));
assert_eq!(Vector::try_new(vec![1, 2, 3]), Option::<Vector<_, 2>>::None);
assert_eq!(Vector::try_new(vec![1]), Option::<Vector<_, 2>>::None);
Source

pub fn try_new_overflow(i: impl IntoIterator<Item = T>) -> Option<Self>

Like [try_new], but the iterator provided may be longer than the desired vector (extra elements are consumed). However, it may not be shorter then the desired vector.


assert_eq!(Vector::try_new_overflow(vec![1, 2]), Some(Vector::new2(1, 2)));
assert_eq!(Vector::try_new_overflow(vec![1, 2, 3]), Some(Vector::new2(1, 2)));
assert_eq!(Vector::try_new_overflow(vec![1, 2, 3]), Some(Vector::new3(1, 2, 3)));
assert_eq!(Vector::try_new_overflow(vec![1]), Option::<Vector<_, 2>>::None);
Source

pub fn dimensions(&self) -> usize

Get the number of dimensions this vector has

let v = Vector::new([1, 2, 3, 4]);

assert_eq!(v.dimensions(), 4);
Source

pub fn get(&self, n: usize) -> Option<&T>

get a reference to the nth item in the vector


let mut v = Vector::new2(1, 2);
assert_eq!(v.get(0), Some(&1));
assert_eq!(v.get(1), Some(&2));
assert_eq!(v.get(2), None);
Source

pub fn get_mut(&mut self, n: usize) -> Option<&mut T>

get a mutable reference to the nth item in the vector


let mut v = Vector::new2(1, 2);
assert_eq!(v.get_mut(0), Some(&mut 1));
assert_eq!(v.get_mut(1), Some(&mut 2));
assert_eq!(v.get_mut(2), None);
Source

pub fn iter(&self) -> impl Iterator<Item = &T>

Create an iterator over references to items in the vector


let v = Vector::new2(1, 2);
let mut i = v.iter();
assert_eq!(i.next(), Some(&1));
assert_eq!(i.next(), Some(&2));
assert_eq!(i.next(), None);
Source

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T>

Create an iterator over mutable references to items in the vector


let mut v = Vector::new2(1, 2);
let mut i = v.iter_mut();
assert_eq!(i.next(), Some(&mut 1));
assert_eq!(i.next(), Some(&mut 2));
assert_eq!(i.next(), None);

let mut v = Vector::new2(1, 2);
{
    let mut i = v.iter_mut();
    *i.next().unwrap() = 4;
}
assert_eq!(v.get(0), Some(&4))
Source

pub fn scale<'a, U>(&'a self, n: U) -> Vector<<&'a T as Mul<U>>::Output, DIM>
where &'a T: Mul<U>, U: Clone,

Scale a vector by a scalar, multiplying each element by n.


let v = Vector::new([1, 2, 3]);

assert_eq!(v.scale(2), Vector::new([2, 4, 6]));
assert_eq!(v.scale(3), Vector::new([3, 6, 9]));
Source

pub fn unscale<'a, U>( &'a self, other: U, ) -> Vector<<&'a T as Div<U>>::Output, DIM>
where &'a T: Div<U>, U: Clone,

Unscale a vector by a scalar. This divides every element by n.


let v = Vector::new([4, 8, 16]);

assert_eq!(v.unscale(2), Vector::new([2, 4, 8]));
assert_eq!(v.unscale(4), Vector::new([1, 2, 4]));
Source

pub fn zero() -> Self
where T: Num + Clone,

Create a vector filled with the zero value of T (according to num)


let v = Vector::new((0, 0, 0));
assert_eq!(Vector::zero(), v);
Source

pub fn one() -> Self
where T: Num + Clone,

Create a vector filled with the one value of T (according to num)


let v = Vector::new((1, 1, 1));
assert_eq!(Vector::one(), v);
Source§

impl<T, const DIM: usize> Vector<T, DIM>
where T: Into<f64>,

Source

pub fn magnitude(&self) -> f64
where T: Clone,

Calculate the magnitude of this vector


let mut v = Vector::new2(3, 4);

assert_eq!(v.magnitude(), 5.0)
Source

pub fn with_magnitude(&self, magnitude: impl Into<f64>) -> Vector<f64, DIM>
where T: Clone + Into<f64>,

Create a new vector with the same direction but another magnitude

let mut v = Vector::new2(3, 4);

assert_eq!(v.with_magnitude(10), Vector::new((6.0, 8.0)))
Source

pub fn normalize(&self) -> Vector<f64, DIM>
where T: Clone + Into<f64>,

Normalizes the vector. Sets the magnitude to 1.

let mut v = Vector::new2(3, 4);

assert_eq!(v.normalize(), Vector::new((3.0/5.0, 4.0/5.0)))
Source

pub fn limit(&self, limit: impl Into<f64>) -> Vector<f64, DIM>
where T: Clone + Into<f64>,

Limit the magnitude of a vector. If the magnitude is less than the limit nothing changes (except all values are cast to floats). If the magnitude is larger than the limit, the magnitude is set to this limit.


assert_eq!(Vector::new2(3, 4).limit(10), Vector::new((3.0, 4.0)));
assert_eq!(Vector::new2(9, 12).limit(10), Vector::new((6.0, 8.0)));
Source

pub fn angle<O>(&self, other: &Vector<O, DIM>) -> f64
where T: Mul<O> + Clone, <T as Mul<O>>::Output: Sum + Into<f64>, O: Clone + Into<f64>,

Calculates the angle between two vectors (in radians)


let mut v1 = Vector::new2(0, 1);
let mut v2 = Vector::new2(1, 0);

assert_eq!(v1.angle(&v2).to_degrees(), 90.0)
Source

pub fn distance<O>(&self, other: &Vector<O, DIM>) -> f64
where for<'a> Self: Sub<&'a Vector<O, DIM>>, O: Into<f64> + Clone, T: Clone,

Calculate the distance from this vector to another vector


let mut v1 = Vector::new2(0, 0);
let mut v2 = Vector::new2(3, 4);

assert_eq!(v1.distance(&v2), 5.0)
Source

pub fn dot<O>(&self, other: &Vector<O, DIM>) -> <T as Mul<O>>::Output
where T: Mul<O>, for<'a, 'b> &'a Self: Mul<&'b Vector<O, DIM>, Output = Vector<<T as Mul<O>>::Output, DIM>>, <T as Mul<O>>::Output: Sum<<T as Mul<O>>::Output>,

Calculate the dot product of this vector


let v1 = Vector::new((1, 2));
let v2 = Vector::new((&2, &1));

assert_eq!(v1.dot(&v2), 4)
Source

pub fn perpendicular<O>(&self, other: &Vector<O, DIM>) -> bool
where T: Mul<O>, for<'a, 'b> &'a Self: Mul<&'b Vector<O, DIM>, Output = Vector<<T as Mul<O>>::Output, DIM>>, <T as Mul<O>>::Output: Sum<<T as Mul<O>>::Output> + Num,

Find if the angle between two vectors is 90 degrees


let v1 = Vector::new((0, 1));
let v2 = Vector::new((1, 0));
let v3 = Vector::new((1, 1));

assert!(v1.perpendicular(&v2));
assert!(!v1.perpendicular(&v3));
Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn x(&self) -> &T

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y(&self) -> &T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z(&self) -> &T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn w(&self) -> &T

Source

pub fn w_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn a(&self) -> &T

Source

pub fn a_mut(&mut self) -> &mut T

Source

pub fn b(&self) -> &T

Source

pub fn b_mut(&mut self) -> &mut T

Source

pub fn c(&self) -> &T

Source

pub fn c_mut(&mut self) -> &mut T

Source

pub fn d(&self) -> &T

Source

pub fn d_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Source§

impl<T> Vector<T, { _ }>

Source

pub fn m(&self) -> &T

Source

pub fn m_mut(&mut self) -> &mut T

Source

pub fn n(&self) -> &T

Source

pub fn n_mut(&mut self) -> &mut T

Trait Implementations§

Source§

impl<T: Add<T> + Clone, const DIM: usize> Add<&Vector<T, DIM>> for Vector<T, DIM>

Source§

type Output = Vector<<T as Add>::Output, DIM>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a, 'b, U: Clone, T: Add<U> + Clone, const DIM: usize> Add<&'a Vector<U, DIM>> for &'b Vector<T, DIM>

Source§

type Output = Vector<<T as Add<U>>::Output, DIM>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a Vector<U, DIM>) -> Self::Output

Performs the + operation. Read more
Source§

impl<U: Clone, T: Add<U> + Clone, const DIM: usize> Add<Vector<U, DIM>> for &Vector<T, DIM>

Source§

type Output = Vector<<T as Add<U>>::Output, DIM>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Vector<U, DIM>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Add<T>, const DIM: usize> Add for Vector<T, DIM>

Source§

type Output = Vector<<T as Add>::Output, DIM>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Source§

fn as_tuple( self, ) -> (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Source§

fn as_tuple( self, ) -> (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Source§

fn as_tuple(self) -> (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Source§

fn as_tuple(self) -> (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Source§

fn as_tuple(self) -> (&'a T, &'a T, &'a T, &'a T, &'a T, &'a T)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T, &'a T, &'a T, &'a T, &'a T)

Source§

fn as_tuple(self) -> (&'a T, &'a T, &'a T, &'a T, &'a T)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T, &'a T, &'a T, &'a T)

Source§

fn as_tuple(self) -> (&'a T, &'a T, &'a T, &'a T)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T, &'a T, &'a T)

Source§

fn as_tuple(self) -> (&'a T, &'a T, &'a T)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T, &'a T)

Source§

fn as_tuple(self) -> (&'a T, &'a T)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

type Res = (&'a T,)

Source§

fn as_tuple(self) -> (&'a T,)

Turn a vector into a tuple Read more
Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<'a, T> AsTuple for &'a Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

type Res = (T, T, T, T, T, T)

Source§

fn as_tuple(self) -> (T, T, T, T, T, T)

Turn a vector into a tuple Read more
Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

type Res = (T, T, T, T, T)

Source§

fn as_tuple(self) -> (T, T, T, T, T)

Turn a vector into a tuple Read more
Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

type Res = (T, T, T, T)

Source§

fn as_tuple(self) -> (T, T, T, T)

Turn a vector into a tuple Read more
Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

type Res = (T, T, T)

Source§

fn as_tuple(self) -> (T, T, T)

Turn a vector into a tuple Read more
Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

type Res = (T, T)

Source§

fn as_tuple(self) -> (T, T)

Turn a vector into a tuple Read more
Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

type Res = (T,)

Source§

fn as_tuple(self) -> (T,)

Turn a vector into a tuple Read more
Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T> AsTuple for Vector<T, { _ }>

Source§

impl<T: Clone, const DIM: usize> Clone for Vector<T, DIM>

Source§

fn clone(&self) -> Vector<T, DIM>

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<T: Debug, const DIM: usize> Debug for Vector<T, DIM>

Source§

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

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

impl<T: Display, const DIM: usize> Display for Vector<T, DIM>

Source§

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

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

impl<T: Div<T> + Clone, const DIM: usize> Div<&Vector<T, DIM>> for Vector<T, DIM>

Source§

type Output = Vector<<T as Div>::Output, DIM>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<'a, 'b, U: Clone, T: Div<U> + Clone, const DIM: usize> Div<&'a Vector<U, DIM>> for &'b Vector<T, DIM>

Source§

type Output = Vector<<T as Div<U>>::Output, DIM>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'a Vector<U, DIM>) -> Self::Output

Performs the / operation. Read more
Source§

impl<U: Clone, T: Div<U> + Clone, const DIM: usize> Div<Vector<U, DIM>> for &Vector<T, DIM>

Source§

type Output = Vector<<T as Div<U>>::Output, DIM>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Vector<U, DIM>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Div<T>, const DIM: usize> Div for Vector<T, DIM>

Source§

type Output = Vector<<T as Div>::Output, DIM>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl<T> From<(T,)> for Vector<T, { _ }>

Source§

fn from((AF): (T,)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T)> for Vector<T, { _ }>

Source§

fn from((AE, AF): (T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T)> for Vector<T, { _ }>

Source§

fn from((AD, AE, AF): (T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T)> for Vector<T, { _ }>

Source§

fn from((AC, AD, AE, AF): (T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from((AB, AC, AD, AE, AF): (T, T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from((AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from((Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from((Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from((X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)> for Vector<T, { _ }>

Source§

fn from( (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF): (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T), ) -> Self

Converts to this type from the input type.
Source§

impl<T: Hash, const DIM: usize> Hash for Vector<T, DIM>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T, const DIM: usize> Index<usize> for Vector<T, DIM>

Source§

type Output = T

The returned type after indexing.
Source§

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

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, const DIM: usize> IndexMut<usize> for Vector<T, DIM>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, T, const DIM: usize> IntoIterator for &'a Vector<T, DIM>

Source§

type Item = &'a T

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T, const DIM: usize> IntoIterator for Vector<T, DIM>

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T, DIM>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T, const DIM: usize> MapVector<&'a T, DIM> for &'a Vector<T, DIM>

Source§

fn map<U, F: FnMut(&'a T) -> U>(self, func: F) -> Vector<U, DIM>

Map an operation over every element of the vector Read more
Source§

impl<T, const DIM: usize> MapVector<T, DIM> for Vector<T, DIM>

Source§

fn map<U, F: FnMut(T) -> U>(self, func: F) -> Vector<U, DIM>

Map an operation over every element of the vector Read more
Source§

impl<T: Mul<T> + Clone, const DIM: usize> Mul<&Vector<T, DIM>> for Vector<T, DIM>

Source§

type Output = Vector<<T as Mul>::Output, DIM>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a, 'b, U: Clone, T: Mul<U> + Clone, const DIM: usize> Mul<&'a Vector<U, DIM>> for &'b Vector<T, DIM>

Source§

type Output = Vector<<T as Mul<U>>::Output, DIM>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Vector<U, DIM>) -> Self::Output

Performs the * operation. Read more
Source§

impl<U: Clone, T: Mul<U> + Clone, const DIM: usize> Mul<Vector<U, DIM>> for &Vector<T, DIM>

Source§

type Output = Vector<<T as Mul<U>>::Output, DIM>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vector<U, DIM>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Mul<T>, const DIM: usize> Mul for Vector<T, DIM>

Source§

type Output = Vector<<T as Mul>::Output, DIM>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a, T, const DIM: usize> Neg for &'a Vector<T, DIM>
where &'a T: Neg,

Source§

type Output = Vector<<&'a T as Neg>::Output, DIM>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: Neg, const DIM: usize> Neg for Vector<T, DIM>

Source§

type Output = Vector<<T as Neg>::Output, DIM>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: PartialEq, const DIM: usize> PartialEq for Vector<T, DIM>

Source§

fn eq(&self, other: &Vector<T, DIM>) -> 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: Rem<T> + Clone, const DIM: usize> Rem<&Vector<T, DIM>> for Vector<T, DIM>

Source§

type Output = Vector<<T as Rem>::Output, DIM>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, 'b, U: Clone, T: Rem<U> + Clone, const DIM: usize> Rem<&'a Vector<U, DIM>> for &'b Vector<T, DIM>

Source§

type Output = Vector<<T as Rem<U>>::Output, DIM>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &'a Vector<U, DIM>) -> Self::Output

Performs the % operation. Read more
Source§

impl<U: Clone, T: Rem<U> + Clone, const DIM: usize> Rem<Vector<U, DIM>> for &Vector<T, DIM>

Source§

type Output = Vector<<T as Rem<U>>::Output, DIM>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Vector<U, DIM>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T: Rem<T>, const DIM: usize> Rem for Vector<T, DIM>

Source§

type Output = Vector<<T as Rem>::Output, DIM>

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl<T: Sub<T> + Clone, const DIM: usize> Sub<&Vector<T, DIM>> for Vector<T, DIM>

Source§

type Output = Vector<<T as Sub>::Output, DIM>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a, 'b, U: Clone, T: Sub<U> + Clone, const DIM: usize> Sub<&'a Vector<U, DIM>> for &'b Vector<T, DIM>

Source§

type Output = Vector<<T as Sub<U>>::Output, DIM>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a Vector<U, DIM>) -> Self::Output

Performs the - operation. Read more
Source§

impl<U: Clone, T: Sub<U> + Clone, const DIM: usize> Sub<Vector<U, DIM>> for &Vector<T, DIM>

Source§

type Output = Vector<<T as Sub<U>>::Output, DIM>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Vector<U, DIM>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Sub<T>, const DIM: usize> Sub for Vector<T, DIM>

Source§

type Output = Vector<<T as Sub>::Output, DIM>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<T: Copy, const DIM: usize> Copy for Vector<T, DIM>

Source§

impl<T: Eq, const DIM: usize> Eq for Vector<T, DIM>

Source§

impl<T, const DIM: usize> StructuralPartialEq for Vector<T, DIM>

Auto Trait Implementations§

§

impl<T, const DIM: usize> Freeze for Vector<T, DIM>
where T: Freeze,

§

impl<T, const DIM: usize> RefUnwindSafe for Vector<T, DIM>
where T: RefUnwindSafe,

§

impl<T, const DIM: usize> Send for Vector<T, DIM>
where T: Send,

§

impl<T, const DIM: usize> Sync for Vector<T, DIM>
where T: Sync,

§

impl<T, const DIM: usize> Unpin for Vector<T, DIM>
where T: Unpin,

§

impl<T, const DIM: usize> UnwindSafe for Vector<T, DIM>
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> 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> 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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,