Struct spectra::linear::Vector4
[−]
[src]
#[repr(C)]pub struct Vector4<S> { pub x: S, pub y: S, pub z: S, pub w: S, }
A 4-dimensional vector.
This type is marked as #[repr(C)]
.
Fields
x: S
The x component of the vector.
y: S
The y component of the vector.
z: S
The z component of the vector.
w: S
The w component of the vector.
Methods
impl<S> Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
pub fn unit_x() -> Vector4<S>
[src]
A unit vector in the x
direction.
pub fn unit_y() -> Vector4<S>
[src]
A unit vector in the y
direction.
pub fn unit_z() -> Vector4<S>
[src]
A unit vector in the z
direction.
pub fn unit_w() -> Vector4<S>
[src]
A unit vector in the w
direction.
pub fn truncate(self) -> Vector3<S>
[src]
Create a Vector3
, dropping the w
value.
pub fn truncate_n(&self, n: isize) -> Vector3<S>
[src]
Create a Vector3
, dropping the nth element.
impl<S> Vector4<S>
[src]
pub fn new(x: S, y: S, z: S, w: S) -> Vector4<S>
[src]
Construct a new vector, using the provided values.
impl<S> Vector4<S> where
S: Copy + NumCast,
[src]
S: Copy + NumCast,
Trait Implementations
impl<'a, S> Sub<&'a Vector4<S>> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the -
operator.
fn sub(self, other: &'a Vector4<S>) -> Vector4<S>
[src]
Performs the -
operation.
impl<'a, S> Sub<Vector4<S>> for &'a Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the -
operator.
fn sub(self, other: Vector4<S>) -> Vector4<S>
[src]
Performs the -
operation.
impl<'a, 'b, S> Sub<&'a Vector4<S>> for &'b Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the -
operator.
fn sub(self, other: &'a Vector4<S>) -> Vector4<S>
[src]
Performs the -
operation.
impl<S> Sub<Vector4<S>> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the -
operator.
fn sub(self, other: Vector4<S>) -> Vector4<S>
[src]
Performs the -
operation.
impl<S> ElementWise<Vector4<S>> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
fn add_element_wise(self, rhs: Vector4<S>) -> Vector4<S>
[src]
fn sub_element_wise(self, rhs: Vector4<S>) -> Vector4<S>
[src]
fn mul_element_wise(self, rhs: Vector4<S>) -> Vector4<S>
[src]
fn div_element_wise(self, rhs: Vector4<S>) -> Vector4<S>
[src]
fn rem_element_wise(self, rhs: Vector4<S>) -> Vector4<S>
[src]
fn add_assign_element_wise(&mut self, rhs: Vector4<S>)
[src]
fn sub_assign_element_wise(&mut self, rhs: Vector4<S>)
[src]
fn mul_assign_element_wise(&mut self, rhs: Vector4<S>)
[src]
fn div_assign_element_wise(&mut self, rhs: Vector4<S>)
[src]
fn rem_assign_element_wise(&mut self, rhs: Vector4<S>)
[src]
impl<S> ElementWise<S> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
fn add_element_wise(self, rhs: S) -> Vector4<S>
[src]
fn sub_element_wise(self, rhs: S) -> Vector4<S>
[src]
fn mul_element_wise(self, rhs: S) -> Vector4<S>
[src]
fn div_element_wise(self, rhs: S) -> Vector4<S>
[src]
fn rem_element_wise(self, rhs: S) -> Vector4<S>
[src]
fn add_assign_element_wise(&mut self, rhs: S)
[src]
fn sub_assign_element_wise(&mut self, rhs: S)
[src]
fn mul_assign_element_wise(&mut self, rhs: S)
[src]
fn div_assign_element_wise(&mut self, rhs: S)
[src]
fn rem_assign_element_wise(&mut self, rhs: S)
[src]
impl<S> IndexMut<usize> for Vector4<S>
[src]
ⓘImportant traits for &'a mut Wfn index_mut(&'a mut self, i: usize) -> &'a mut S
[src]
Performs the mutable indexing (container[index]
) operation.
impl<S> IndexMut<RangeTo<usize>> for Vector4<S>
[src]
fn index_mut(&'a mut self, i: RangeTo<usize>) -> &'a mut [S]
[src]
Performs the mutable indexing (container[index]
) operation.
impl<S> IndexMut<RangeFull> for Vector4<S>
[src]
fn index_mut(&'a mut self, i: RangeFull) -> &'a mut [S]
[src]
Performs the mutable indexing (container[index]
) operation.
impl<S> IndexMut<Range<usize>> for Vector4<S>
[src]
fn index_mut(&'a mut self, i: Range<usize>) -> &'a mut [S]
[src]
Performs the mutable indexing (container[index]
) operation.
impl<S> IndexMut<RangeFrom<usize>> for Vector4<S>
[src]
fn index_mut(&'a mut self, i: RangeFrom<usize>) -> &'a mut [S]
[src]
Performs the mutable indexing (container[index]
) operation.
impl<S> Array for Vector4<S> where
S: Copy,
[src]
S: Copy,
type Element = S
fn from_value(scalar: S) -> Vector4<S>
[src]
Construct a vector from a single value, replicating it. Read more
fn sum(self) -> S where
S: Add<S, Output = S>,
[src]
S: Add<S, Output = S>,
The sum of the elements of the array.
fn product(self) -> S where
S: Mul<S, Output = S>,
[src]
S: Mul<S, Output = S>,
The product of the elements of the array.
fn as_ptr(&self) -> *const Self::Element
[src]
Get the pointer to the first element of the array.
fn as_mut_ptr(&mut self) -> *mut Self::Element
[src]
Get a mutable pointer to the first element of the array.
fn swap_elements(&mut self, i: usize, j: usize)
[src]
Swap the elements at indices i
and j
in-place.
impl<S> ApproxEq for Vector4<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Epsilon = <S as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> <S as ApproxEq>::Epsilon
[src]
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> <S as ApproxEq>::Epsilon
[src]
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
The default ULPs to tolerate when testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &Vector4<S>,
epsilon: <S as ApproxEq>::Epsilon,
max_relative: <S as ApproxEq>::Epsilon
) -> bool
[src]
&self,
other: &Vector4<S>,
epsilon: <S as ApproxEq>::Epsilon,
max_relative: <S as ApproxEq>::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn ulps_eq(
&self,
other: &Vector4<S>,
epsilon: <S as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &Vector4<S>,
epsilon: <S as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.
impl Mul<Vector4<isize>> for isize
[src]
type Output = Vector4<isize>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<isize>) -> Vector4<isize>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<u64>> for u64
[src]
type Output = Vector4<u64>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<u64>) -> Vector4<u64>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<u8>> for u8
[src]
type Output = Vector4<u8>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<u8>) -> Vector4<u8>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<usize>> for usize
[src]
type Output = Vector4<usize>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<usize>) -> Vector4<usize>
[src]
Performs the *
operation.
impl Mul<Vector4<f64>> for f64
[src]
type Output = Vector4<f64>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<f64>) -> Vector4<f64>
[src]
Performs the *
operation.
impl Mul<Vector4<usize>> for usize
[src]
type Output = Vector4<usize>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<usize>) -> Vector4<usize>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<i64>> for i64
[src]
type Output = Vector4<i64>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<i64>) -> Vector4<i64>
[src]
Performs the *
operation.
impl<'a, S> Mul<S> for &'a Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the *
operator.
fn mul(self, other: S) -> Vector4<S>
[src]
Performs the *
operation.
impl Mul<Vector4<u8>> for u8
[src]
type Output = Vector4<u8>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<u8>) -> Vector4<u8>
[src]
Performs the *
operation.
impl Mul<Vector4<u64>> for u64
[src]
type Output = Vector4<u64>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<u64>) -> Vector4<u64>
[src]
Performs the *
operation.
impl Mul<Vector4<u32>> for u32
[src]
type Output = Vector4<u32>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<u32>) -> Vector4<u32>
[src]
Performs the *
operation.
impl<'a, 'b, S> Mul<&'a Vector4<S>> for &'b Matrix4<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Vector4<S>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<S>) -> Vector4<S>
[src]
Performs the *
operation.
impl<S> Mul<S> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the *
operator.
fn mul(self, other: S) -> Vector4<S>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<u16>> for u16
[src]
type Output = Vector4<u16>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<u16>) -> Vector4<u16>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<u32>> for u32
[src]
type Output = Vector4<u32>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<u32>) -> Vector4<u32>
[src]
Performs the *
operation.
impl Mul<Vector4<i64>> for i64
[src]
type Output = Vector4<i64>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<i64>) -> Vector4<i64>
[src]
Performs the *
operation.
impl<'a, S> Mul<&'a Vector4<S>> for Matrix4<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Vector4<S>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<S>) -> Vector4<S>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<i8>> for i8
[src]
type Output = Vector4<i8>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<i8>) -> Vector4<i8>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<f32>> for f32
[src]
type Output = Vector4<f32>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<f32>) -> Vector4<f32>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<i32>> for i32
[src]
type Output = Vector4<i32>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<i32>) -> Vector4<i32>
[src]
Performs the *
operation.
impl Mul<Vector4<u16>> for u16
[src]
type Output = Vector4<u16>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<u16>) -> Vector4<u16>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<i16>> for i16
[src]
type Output = Vector4<i16>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<i16>) -> Vector4<i16>
[src]
Performs the *
operation.
impl<'a, S> Mul<Vector4<S>> for &'a Matrix4<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Vector4<S>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<S>) -> Vector4<S>
[src]
Performs the *
operation.
impl Mul<Vector4<i8>> for i8
[src]
type Output = Vector4<i8>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<i8>) -> Vector4<i8>
[src]
Performs the *
operation.
impl Mul<Vector4<i32>> for i32
[src]
type Output = Vector4<i32>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<i32>) -> Vector4<i32>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<f64>> for f64
[src]
type Output = Vector4<f64>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<f64>) -> Vector4<f64>
[src]
Performs the *
operation.
impl Mul<Vector4<i16>> for i16
[src]
type Output = Vector4<i16>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<i16>) -> Vector4<i16>
[src]
Performs the *
operation.
impl<'a> Mul<&'a Vector4<isize>> for isize
[src]
type Output = Vector4<isize>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector4<isize>) -> Vector4<isize>
[src]
Performs the *
operation.
impl<S> Mul<Vector4<S>> for Matrix4<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Vector4<S>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<S>) -> Vector4<S>
[src]
Performs the *
operation.
impl Mul<Vector4<f32>> for f32
[src]
type Output = Vector4<f32>
The resulting type after applying the *
operator.
fn mul(self, other: Vector4<f32>) -> Vector4<f32>
[src]
Performs the *
operation.
impl<S> RemAssign<S> for Vector4<S> where
S: BaseNum + RemAssign<S>,
[src]
S: BaseNum + RemAssign<S>,
fn rem_assign(&mut self, scalar: S)
[src]
Performs the %=
operation.
impl Rem<Vector4<isize>> for isize
[src]
type Output = Vector4<isize>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<isize>) -> Vector4<isize>
[src]
Performs the %
operation.
impl Rem<Vector4<i8>> for i8
[src]
type Output = Vector4<i8>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<i8>) -> Vector4<i8>
[src]
Performs the %
operation.
impl Rem<Vector4<i16>> for i16
[src]
type Output = Vector4<i16>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<i16>) -> Vector4<i16>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<f64>> for f64
[src]
type Output = Vector4<f64>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<f64>) -> Vector4<f64>
[src]
Performs the %
operation.
impl Rem<Vector4<f64>> for f64
[src]
type Output = Vector4<f64>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<f64>) -> Vector4<f64>
[src]
Performs the %
operation.
impl Rem<Vector4<f32>> for f32
[src]
type Output = Vector4<f32>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<f32>) -> Vector4<f32>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<u16>> for u16
[src]
type Output = Vector4<u16>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<u16>) -> Vector4<u16>
[src]
Performs the %
operation.
impl Rem<Vector4<usize>> for usize
[src]
type Output = Vector4<usize>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<usize>) -> Vector4<usize>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<i32>> for i32
[src]
type Output = Vector4<i32>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<i32>) -> Vector4<i32>
[src]
Performs the %
operation.
impl Rem<Vector4<i32>> for i32
[src]
type Output = Vector4<i32>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<i32>) -> Vector4<i32>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<f32>> for f32
[src]
type Output = Vector4<f32>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<f32>) -> Vector4<f32>
[src]
Performs the %
operation.
impl Rem<Vector4<i64>> for i64
[src]
type Output = Vector4<i64>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<i64>) -> Vector4<i64>
[src]
Performs the %
operation.
impl Rem<Vector4<u8>> for u8
[src]
type Output = Vector4<u8>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<u8>) -> Vector4<u8>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<i8>> for i8
[src]
type Output = Vector4<i8>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<i8>) -> Vector4<i8>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<isize>> for isize
[src]
type Output = Vector4<isize>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<isize>) -> Vector4<isize>
[src]
Performs the %
operation.
impl Rem<Vector4<u16>> for u16
[src]
type Output = Vector4<u16>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<u16>) -> Vector4<u16>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<usize>> for usize
[src]
type Output = Vector4<usize>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<usize>) -> Vector4<usize>
[src]
Performs the %
operation.
impl<'a, S> Rem<S> for &'a Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the %
operator.
fn rem(self, other: S) -> Vector4<S>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<u32>> for u32
[src]
type Output = Vector4<u32>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<u32>) -> Vector4<u32>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<u8>> for u8
[src]
type Output = Vector4<u8>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<u8>) -> Vector4<u8>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<i64>> for i64
[src]
type Output = Vector4<i64>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<i64>) -> Vector4<i64>
[src]
Performs the %
operation.
impl<S> Rem<S> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the %
operator.
fn rem(self, other: S) -> Vector4<S>
[src]
Performs the %
operation.
impl Rem<Vector4<u64>> for u64
[src]
type Output = Vector4<u64>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<u64>) -> Vector4<u64>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<u64>> for u64
[src]
type Output = Vector4<u64>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<u64>) -> Vector4<u64>
[src]
Performs the %
operation.
impl Rem<Vector4<u32>> for u32
[src]
type Output = Vector4<u32>
The resulting type after applying the %
operator.
fn rem(self, other: Vector4<u32>) -> Vector4<u32>
[src]
Performs the %
operation.
impl<'a> Rem<&'a Vector4<i16>> for i16
[src]
type Output = Vector4<i16>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Vector4<i16>) -> Vector4<i16>
[src]
Performs the %
operation.
impl<S> InnerSpace for Vector4<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn dot(self, other: Vector4<S>) -> S
[src]
Vector dot (or inner) product.
fn is_perpendicular(self, other: Self) -> bool
[src]
Returns true
if the vector is perpendicular (at right angles) to the other vector. Read more
fn magnitude2(self) -> Self::Scalar
[src]
Returns the squared magnitude. Read more
fn magnitude(self) -> Self::Scalar
[src]
The distance from the tail to the tip of the vector.
fn angle(self, other: Self) -> Rad<Self::Scalar>
[src]
Returns the angle between two vectors in radians.
fn normalize(self) -> Self
[src]
Returns a vector with the same direction, but with a magnitude of 1
.
fn normalize_to(self, magnitude: Self::Scalar) -> Self
[src]
Returns a vector with the same direction and a given magnitude.
fn lerp(self, other: Self, amount: Self::Scalar) -> Self
[src]
Returns the result of linearly interpolating the magnitude of the vector towards the magnitude of other
by the specified amount. Read more
impl<S> Into<[S; 4]> for Vector4<S>
[src]
impl<S> Into<(S, S, S, S)> for Vector4<S>
[src]
impl<S> Copy for Vector4<S> where
S: Copy,
[src]
S: Copy,
impl<S> VectorSpace for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Scalar = S
The associated scalar.
impl<S> AsMut<(S, S, S, S)> for Vector4<S>
[src]
impl<S> AsMut<[S; 4]> for Vector4<S>
[src]
impl<S> AddAssign<Vector4<S>> for Vector4<S> where
S: BaseNum + AddAssign<S>,
[src]
S: BaseNum + AddAssign<S>,
fn add_assign(&mut self, other: Vector4<S>)
[src]
Performs the +=
operation.
impl<S> MulAssign<S> for Vector4<S> where
S: BaseNum + MulAssign<S>,
[src]
S: BaseNum + MulAssign<S>,
fn mul_assign(&mut self, scalar: S)
[src]
Performs the *=
operation.
impl<S> PartialEq<Vector4<S>> for Vector4<S> where
S: PartialEq<S>,
[src]
S: PartialEq<S>,
fn eq(&self, __arg_0: &Vector4<S>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Vector4<S>) -> bool
[src]
This method tests for !=
.
impl<S> Clone for Vector4<S> where
S: Clone,
[src]
S: Clone,
fn clone(&self) -> Vector4<S>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, 'b, S> Add<&'a Vector4<S>> for &'b Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the +
operator.
fn add(self, other: &'a Vector4<S>) -> Vector4<S>
[src]
Performs the +
operation.
impl<S> Add<Vector4<S>> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the +
operator.
fn add(self, other: Vector4<S>) -> Vector4<S>
[src]
Performs the +
operation.
impl<'a, S> Add<Vector4<S>> for &'a Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the +
operator.
fn add(self, other: Vector4<S>) -> Vector4<S>
[src]
Performs the +
operation.
impl<'a, S> Add<&'a Vector4<S>> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the +
operator.
fn add(self, other: &'a Vector4<S>) -> Vector4<S>
[src]
Performs the +
operation.
impl<S> Index<RangeFrom<usize>> for Vector4<S>
[src]
type Output = [S]
The returned type after indexing.
fn index(&'a self, i: RangeFrom<usize>) -> &'a [S]
[src]
Performs the indexing (container[index]
) operation.
impl<S> Index<RangeFull> for Vector4<S>
[src]
type Output = [S]
The returned type after indexing.
fn index(&'a self, i: RangeFull) -> &'a [S]
[src]
Performs the indexing (container[index]
) operation.
impl<S> Index<usize> for Vector4<S>
[src]
type Output = S
The returned type after indexing.
ⓘImportant traits for &'a mut Wfn index(&'a self, i: usize) -> &'a S
[src]
Performs the indexing (container[index]
) operation.
impl<S> Index<RangeTo<usize>> for Vector4<S>
[src]
type Output = [S]
The returned type after indexing.
fn index(&'a self, i: RangeTo<usize>) -> &'a [S]
[src]
Performs the indexing (container[index]
) operation.
impl<S> Index<Range<usize>> for Vector4<S>
[src]
type Output = [S]
The returned type after indexing.
fn index(&'a self, i: Range<usize>) -> &'a [S]
[src]
Performs the indexing (container[index]
) operation.
impl<S> MetricSpace for Vector4<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Metric = S
The metric to be returned by the distance
function.
fn distance2(self, other: Vector4<S>) -> S
[src]
Returns the squared distance. Read more
fn distance(self, other: Self) -> Self::Metric
[src]
The distance between two values.
impl<S> AsRef<(S, S, S, S)> for Vector4<S>
[src]
impl<S> AsRef<[S; 4]> for Vector4<S>
[src]
impl<S> Rand for Vector4<S> where
S: BaseFloat + Rand,
[src]
S: BaseFloat + Rand,
fn rand<R>(rng: &mut R) -> Vector4<S> where
R: Rng,
[src]
R: Rng,
Generates a random instance of this type using the specified source of randomness. Read more
impl<S> Sum<Vector4<S>> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
fn sum<I>(iter: I) -> Vector4<S> where
I: Iterator<Item = Vector4<S>>,
[src]
I: Iterator<Item = Vector4<S>>,
Method which takes an iterator and generates Self
from the elements by "summing up" the items. Read more
impl<'a, S> Sum<&'a Vector4<S>> for Vector4<S> where
S: 'a + BaseNum,
[src]
S: 'a + BaseNum,
fn sum<I>(iter: I) -> Vector4<S> where
I: Iterator<Item = &'a Vector4<S>>,
[src]
I: Iterator<Item = &'a Vector4<S>>,
Method which takes an iterator and generates Self
from the elements by "summing up" the items. Read more
impl<S> SubAssign<Vector4<S>> for Vector4<S> where
S: BaseNum + SubAssign<S>,
[src]
S: BaseNum + SubAssign<S>,
fn sub_assign(&mut self, other: Vector4<S>)
[src]
Performs the -=
operation.
impl Div<Vector4<i64>> for i64
[src]
type Output = Vector4<i64>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<i64>) -> Vector4<i64>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<u32>> for u32
[src]
type Output = Vector4<u32>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<u32>) -> Vector4<u32>
[src]
Performs the /
operation.
impl<S> Div<S> for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the /
operator.
fn div(self, other: S) -> Vector4<S>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<usize>> for usize
[src]
type Output = Vector4<usize>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<usize>) -> Vector4<usize>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<u64>> for u64
[src]
type Output = Vector4<u64>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<u64>) -> Vector4<u64>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<f64>> for f64
[src]
type Output = Vector4<f64>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<f64>) -> Vector4<f64>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<u8>> for u8
[src]
type Output = Vector4<u8>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<u8>) -> Vector4<u8>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<i32>> for i32
[src]
type Output = Vector4<i32>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<i32>) -> Vector4<i32>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<i16>> for i16
[src]
type Output = Vector4<i16>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<i16>) -> Vector4<i16>
[src]
Performs the /
operation.
impl Div<Vector4<u32>> for u32
[src]
type Output = Vector4<u32>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<u32>) -> Vector4<u32>
[src]
Performs the /
operation.
impl Div<Vector4<f32>> for f32
[src]
type Output = Vector4<f32>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<f32>) -> Vector4<f32>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<isize>> for isize
[src]
type Output = Vector4<isize>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<isize>) -> Vector4<isize>
[src]
Performs the /
operation.
impl Div<Vector4<isize>> for isize
[src]
type Output = Vector4<isize>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<isize>) -> Vector4<isize>
[src]
Performs the /
operation.
impl Div<Vector4<usize>> for usize
[src]
type Output = Vector4<usize>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<usize>) -> Vector4<usize>
[src]
Performs the /
operation.
impl Div<Vector4<u8>> for u8
[src]
type Output = Vector4<u8>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<u8>) -> Vector4<u8>
[src]
Performs the /
operation.
impl<'a, S> Div<S> for &'a Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
type Output = Vector4<S>
The resulting type after applying the /
operator.
fn div(self, other: S) -> Vector4<S>
[src]
Performs the /
operation.
impl Div<Vector4<u64>> for u64
[src]
type Output = Vector4<u64>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<u64>) -> Vector4<u64>
[src]
Performs the /
operation.
impl Div<Vector4<f64>> for f64
[src]
type Output = Vector4<f64>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<f64>) -> Vector4<f64>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<f32>> for f32
[src]
type Output = Vector4<f32>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<f32>) -> Vector4<f32>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<i64>> for i64
[src]
type Output = Vector4<i64>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<i64>) -> Vector4<i64>
[src]
Performs the /
operation.
impl Div<Vector4<u16>> for u16
[src]
type Output = Vector4<u16>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<u16>) -> Vector4<u16>
[src]
Performs the /
operation.
impl Div<Vector4<i32>> for i32
[src]
type Output = Vector4<i32>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<i32>) -> Vector4<i32>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<u16>> for u16
[src]
type Output = Vector4<u16>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<u16>) -> Vector4<u16>
[src]
Performs the /
operation.
impl<'a> Div<&'a Vector4<i8>> for i8
[src]
type Output = Vector4<i8>
The resulting type after applying the /
operator.
fn div(self, other: &'a Vector4<i8>) -> Vector4<i8>
[src]
Performs the /
operation.
impl Div<Vector4<i8>> for i8
[src]
type Output = Vector4<i8>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<i8>) -> Vector4<i8>
[src]
Performs the /
operation.
impl Div<Vector4<i16>> for i16
[src]
type Output = Vector4<i16>
The resulting type after applying the /
operator.
fn div(self, other: Vector4<i16>) -> Vector4<i16>
[src]
Performs the /
operation.
impl<S> Zero for Vector4<S> where
S: BaseNum,
[src]
S: BaseNum,
fn zero() -> Vector4<S>
[src]
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
Returns true
if self
is equal to the additive identity.
impl<S> Eq for Vector4<S> where
S: Eq,
[src]
S: Eq,
impl<S> DivAssign<S> for Vector4<S> where
S: BaseNum + DivAssign<S>,
[src]
S: BaseNum + DivAssign<S>,
fn div_assign(&mut self, scalar: S)
[src]
Performs the /=
operation.
impl<S> Hash for Vector4<S> where
S: Hash,
[src]
S: Hash,
fn hash<__HS>(&self, __arg_0: &mut __HS) where
__HS: Hasher,
[src]
__HS: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a, S> From<&'a mut [S; 4]> for &'a mut Vector4<S>
[src]
impl<S> From<(S, S, S, S)> for Vector4<S>
[src]
impl<'a, S> From<&'a mut (S, S, S, S)> for &'a mut Vector4<S>
[src]
impl<'a, S> From<&'a [S; 4]> for &'a Vector4<S>
[src]
impl<'a, S> From<&'a (S, S, S, S)> for &'a Vector4<S>
[src]
impl<S> From<[S; 4]> for Vector4<S> where
S: Clone,
[src]
S: Clone,
impl<S> Debug for Vector4<S> where
S: Debug,
[src]
S: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<S> Neg for Vector4<S> where
S: Neg<Output = S>,
[src]
S: Neg<Output = S>,