Struct cgmath::Vector1

source ·
#[repr(C)]
pub struct Vector1<S> { pub x: S, }
Expand description

A 1-dimensional vector.

This type is marked as #[repr(C)].

Fields§

§x: S

The x component of the vector.

Implementations§

source§

impl<S> Vector1<S>

source

pub const fn new(x: S) -> Vector1<S>

Construct a new vector, using the provided values.

source

pub fn map<U, F>(self, f: F) -> Vector1<U>where F: FnMut(S) -> U,

Perform the given operation on each field in the vector, returning a new point constructed from the operations.

source

pub fn zip<S2, S3, F>(self, v2: Vector1<S2>, f: F) -> Vector1<S3>where F: FnMut(S, S2) -> S3,

Construct a new vector where each component is the result of applying the given operation to each pair of components of the given vectors.

source§

impl<S: NumCast + Copy> Vector1<S>

source

pub fn cast<T: NumCast>(&self) -> Option<Vector1<T>>

Component-wise casting to another type.

source§

impl<S: BaseNum> Vector1<S>

source

pub fn unit_x() -> Vector1<S>

A unit vector in the x direction.

Trait Implementations§

source§

impl<S: BaseFloat> AbsDiffEq<Vector1<S>> for Vector1<S>

§

type Epsilon = <S as AbsDiffEq<S>>::Epsilon

Used for specifying relative comparisons.
source§

fn default_epsilon() -> S::Epsilon

The default tolerance to use when testing values that are close together. Read more
source§

fn abs_diff_eq(&self, other: &Self, epsilon: S::Epsilon) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
source§

impl<'a, 'b, S: BaseNum> Add<&'a Vector1<S>> for &'b Point1<S>

§

type Output = Point1<S>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Vector1<S>) -> Point1<S>

Performs the + operation. Read more
source§

impl<'a, 'b, S: BaseNum> Add<&'a Vector1<S>> for &'b Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Vector1<S>) -> Vector1<S>

Performs the + operation. Read more
source§

impl<'a, S: BaseNum> Add<&'a Vector1<S>> for Point1<S>

§

type Output = Point1<S>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Vector1<S>) -> Point1<S>

Performs the + operation. Read more
source§

impl<'a, S: BaseNum> Add<&'a Vector1<S>> for Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Vector1<S>) -> Vector1<S>

Performs the + operation. Read more
source§

impl<'a, S: BaseNum> Add<Vector1<S>> for &'a Point1<S>

§

type Output = Point1<S>

The resulting type after applying the + operator.
source§

fn add(self, other: Vector1<S>) -> Point1<S>

Performs the + operation. Read more
source§

impl<'a, S: BaseNum> Add<Vector1<S>> for &'a Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the + operator.
source§

fn add(self, other: Vector1<S>) -> Vector1<S>

Performs the + operation. Read more
source§

impl<S: BaseNum> Add<Vector1<S>> for Point1<S>

§

type Output = Point1<S>

The resulting type after applying the + operator.
source§

fn add(self, other: Vector1<S>) -> Point1<S>

Performs the + operation. Read more
source§

impl<S: BaseNum> Add<Vector1<S>> for Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the + operator.
source§

fn add(self, other: Vector1<S>) -> Vector1<S>

Performs the + operation. Read more
source§

impl<S: BaseNum + AddAssign<S>> AddAssign<Vector1<S>> for Point1<S>

source§

fn add_assign(&mut self, vector: Vector1<S>)

Performs the += operation. Read more
source§

impl<S: BaseNum + AddAssign<S>> AddAssign<Vector1<S>> for Vector1<S>

source§

fn add_assign(&mut self, other: Vector1<S>)

Performs the += operation. Read more
source§

impl<S: Copy> Array for Vector1<S>

§

type Element = S

source§

fn len() -> usize

Get the number of elements in the array type Read more
source§

fn from_value(scalar: S) -> Vector1<S>

Construct a vector from a single value, replicating it. Read more
source§

fn sum(self) -> Swhere S: Add<Output = S>,

The sum of the elements of the array.
source§

fn product(self) -> Swhere S: Mul<Output = S>,

The product of the elements of the array.
source§

fn is_finite(&self) -> boolwhere S: Float,

Whether all elements of the array are finite
source§

fn as_ptr(&self) -> *const Self::Element

Get the pointer to the first element of the array.
source§

fn as_mut_ptr(&mut self) -> *mut Self::Element

Get a mutable pointer to the first element of the array.
source§

fn swap_elements(&mut self, i: usize, j: usize)

Swap the elements at indices i and j in-place.
source§

impl<S> AsMut<[S; 1]> for Vector1<S>

source§

fn as_mut(&mut self) -> &mut [S; 1]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<S> AsMut<(S,)> for Vector1<S>

source§

fn as_mut(&mut self) -> &mut (S,)

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<S> AsRef<[S; 1]> for Vector1<S>

source§

fn as_ref(&self) -> &[S; 1]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<S> AsRef<(S,)> for Vector1<S>

source§

fn as_ref(&self) -> &(S,)

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<S: Bounded> Bounded for Vector1<S>

source§

fn min_value() -> Vector1<S>

Returns the smallest finite number this type can represent
source§

fn max_value() -> Vector1<S>

Returns the largest finite number this type can represent
source§

impl<S: Clone> Clone for Vector1<S>

source§

fn clone(&self) -> Vector1<S>

Returns a copy 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<S: Debug> Debug for Vector1<S>

source§

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

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

impl<'a> Div<&'a Vector1<f32>> for f32

§

type Output = Vector1<f32>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<f32>) -> Vector1<f32>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<f64>> for f64

§

type Output = Vector1<f64>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<f64>) -> Vector1<f64>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<i16>> for i16

§

type Output = Vector1<i16>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<i16>) -> Vector1<i16>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<i32>> for i32

§

type Output = Vector1<i32>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<i32>) -> Vector1<i32>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<i64>> for i64

§

type Output = Vector1<i64>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<i64>) -> Vector1<i64>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<i8>> for i8

§

type Output = Vector1<i8>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<i8>) -> Vector1<i8>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<isize>> for isize

§

type Output = Vector1<isize>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<isize>) -> Vector1<isize>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<u16>> for u16

§

type Output = Vector1<u16>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<u16>) -> Vector1<u16>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<u32>> for u32

§

type Output = Vector1<u32>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<u32>) -> Vector1<u32>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<u64>> for u64

§

type Output = Vector1<u64>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<u64>) -> Vector1<u64>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<u8>> for u8

§

type Output = Vector1<u8>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<u8>) -> Vector1<u8>

Performs the / operation. Read more
source§

impl<'a> Div<&'a Vector1<usize>> for usize

§

type Output = Vector1<usize>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Vector1<usize>) -> Vector1<usize>

Performs the / operation. Read more
source§

impl<'a, S: BaseNum> Div<S> for &'a Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the / operator.
source§

fn div(self, other: S) -> Vector1<S>

Performs the / operation. Read more
source§

impl<S: BaseNum> Div<S> for Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the / operator.
source§

fn div(self, other: S) -> Vector1<S>

Performs the / operation. Read more
source§

impl Div<Vector1<f32>> for f32

§

type Output = Vector1<f32>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<f32>) -> Vector1<f32>

Performs the / operation. Read more
source§

impl Div<Vector1<f64>> for f64

§

type Output = Vector1<f64>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<f64>) -> Vector1<f64>

Performs the / operation. Read more
source§

impl Div<Vector1<i16>> for i16

§

type Output = Vector1<i16>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<i16>) -> Vector1<i16>

Performs the / operation. Read more
source§

impl Div<Vector1<i32>> for i32

§

type Output = Vector1<i32>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<i32>) -> Vector1<i32>

Performs the / operation. Read more
source§

impl Div<Vector1<i64>> for i64

§

type Output = Vector1<i64>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<i64>) -> Vector1<i64>

Performs the / operation. Read more
source§

impl Div<Vector1<i8>> for i8

§

type Output = Vector1<i8>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<i8>) -> Vector1<i8>

Performs the / operation. Read more
source§

impl Div<Vector1<isize>> for isize

§

type Output = Vector1<isize>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<isize>) -> Vector1<isize>

Performs the / operation. Read more
source§

impl Div<Vector1<u16>> for u16

§

type Output = Vector1<u16>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<u16>) -> Vector1<u16>

Performs the / operation. Read more
source§

impl Div<Vector1<u32>> for u32

§

type Output = Vector1<u32>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<u32>) -> Vector1<u32>

Performs the / operation. Read more
source§

impl Div<Vector1<u64>> for u64

§

type Output = Vector1<u64>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<u64>) -> Vector1<u64>

Performs the / operation. Read more
source§

impl Div<Vector1<u8>> for u8

§

type Output = Vector1<u8>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<u8>) -> Vector1<u8>

Performs the / operation. Read more
source§

impl Div<Vector1<usize>> for usize

§

type Output = Vector1<usize>

The resulting type after applying the / operator.
source§

fn div(self, other: Vector1<usize>) -> Vector1<usize>

Performs the / operation. Read more
source§

impl<S: BaseNum + DivAssign<S>> DivAssign<S> for Vector1<S>

source§

fn div_assign(&mut self, scalar: S)

Performs the /= operation. Read more
source§

impl<S: BaseNum> ElementWise<S> for Vector1<S>

source§

fn add_element_wise(self, rhs: S) -> Vector1<S>

source§

fn sub_element_wise(self, rhs: S) -> Vector1<S>

source§

fn mul_element_wise(self, rhs: S) -> Vector1<S>

source§

fn div_element_wise(self, rhs: S) -> Vector1<S>

source§

fn rem_element_wise(self, rhs: S) -> Vector1<S>

source§

fn add_assign_element_wise(&mut self, rhs: S)

source§

fn sub_assign_element_wise(&mut self, rhs: S)

source§

fn mul_assign_element_wise(&mut self, rhs: S)

source§

fn div_assign_element_wise(&mut self, rhs: S)

source§

fn rem_assign_element_wise(&mut self, rhs: S)

source§

impl<S: BaseNum> ElementWise<Vector1<S>> for Vector1<S>

source§

impl<'a, S> From<&'a [S; 1]> for &'a Vector1<S>

source§

fn from(v: &'a [S; 1]) -> &'a Vector1<S>

Converts to this type from the input type.
source§

impl<'a, S> From<&'a (S,)> for &'a Vector1<S>

source§

fn from(v: &'a (S,)) -> &'a Vector1<S>

Converts to this type from the input type.
source§

impl<'a, S> From<&'a mut [S; 1]> for &'a mut Vector1<S>

source§

fn from(v: &'a mut [S; 1]) -> &'a mut Vector1<S>

Converts to this type from the input type.
source§

impl<'a, S> From<&'a mut (S,)> for &'a mut Vector1<S>

source§

fn from(v: &'a mut (S,)) -> &'a mut Vector1<S>

Converts to this type from the input type.
source§

impl<S: Clone> From<[S; 1]> for Vector1<S>

source§

fn from(v: [S; 1]) -> Vector1<S>

Converts to this type from the input type.
source§

impl<S> From<(S,)> for Vector1<S>

source§

fn from(v: (S,)) -> Vector1<S>

Converts to this type from the input type.
source§

impl<S: Hash> Hash for Vector1<S>

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<S> Index<Range<usize>> for Vector1<S>

§

type Output = [S]

The returned type after indexing.
source§

fn index<'a>(&'a self, i: Range<usize>) -> &'a [S]

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

impl<S> Index<RangeFrom<usize>> for Vector1<S>

§

type Output = [S]

The returned type after indexing.
source§

fn index<'a>(&'a self, i: RangeFrom<usize>) -> &'a [S]

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

impl<S> Index<RangeFull> for Vector1<S>

§

type Output = [S]

The returned type after indexing.
source§

fn index<'a>(&'a self, i: RangeFull) -> &'a [S]

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

impl<S> Index<RangeTo<usize>> for Vector1<S>

§

type Output = [S]

The returned type after indexing.
source§

fn index<'a>(&'a self, i: RangeTo<usize>) -> &'a [S]

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

impl<S> Index<usize> for Vector1<S>

§

type Output = S

The returned type after indexing.
source§

fn index<'a>(&'a self, i: usize) -> &'a S

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

impl<S> IndexMut<Range<usize>> for Vector1<S>

source§

fn index_mut<'a>(&'a mut self, i: Range<usize>) -> &'a mut [S]

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

impl<S> IndexMut<RangeFrom<usize>> for Vector1<S>

source§

fn index_mut<'a>(&'a mut self, i: RangeFrom<usize>) -> &'a mut [S]

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

impl<S> IndexMut<RangeFull> for Vector1<S>

source§

fn index_mut<'a>(&'a mut self, i: RangeFull) -> &'a mut [S]

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

impl<S> IndexMut<RangeTo<usize>> for Vector1<S>

source§

fn index_mut<'a>(&'a mut self, i: RangeTo<usize>) -> &'a mut [S]

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

impl<S> IndexMut<usize> for Vector1<S>

source§

fn index_mut<'a>(&'a mut self, i: usize) -> &'a mut S

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

impl<S: BaseNum> InnerSpace for Vector1<S>

source§

fn dot(self, other: Vector1<S>) -> S

Vector dot (or inner) product.
source§

fn magnitude2(self) -> Self::Scalar

Returns the squared magnitude. Read more
source§

fn project_on(self, other: Self) -> Self

Returns the vector projection of the current inner space projected onto the supplied argument.
source§

impl<S> Into<[S; 1]> for Vector1<S>

source§

fn into(self) -> [S; 1]

Converts this type into the (usually inferred) input type.
source§

impl<S> Into<(S,)> for Vector1<S>

source§

fn into(self) -> (S,)

Converts this type into the (usually inferred) input type.
source§

impl<S: BaseNum> MetricSpace for Vector1<S>

§

type Metric = S

The metric to be returned by the distance function.
source§

fn distance2(self, other: Self) -> S

Returns the squared distance. Read more
source§

impl<'a> Mul<&'a Vector1<f32>> for f32

§

type Output = Vector1<f32>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<f32>) -> Vector1<f32>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<f64>> for f64

§

type Output = Vector1<f64>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<f64>) -> Vector1<f64>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<i16>> for i16

§

type Output = Vector1<i16>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<i16>) -> Vector1<i16>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<i32>> for i32

§

type Output = Vector1<i32>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<i32>) -> Vector1<i32>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<i64>> for i64

§

type Output = Vector1<i64>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<i64>) -> Vector1<i64>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<i8>> for i8

§

type Output = Vector1<i8>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<i8>) -> Vector1<i8>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<isize>> for isize

§

type Output = Vector1<isize>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<isize>) -> Vector1<isize>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<u16>> for u16

§

type Output = Vector1<u16>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<u16>) -> Vector1<u16>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<u32>> for u32

§

type Output = Vector1<u32>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<u32>) -> Vector1<u32>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<u64>> for u64

§

type Output = Vector1<u64>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<u64>) -> Vector1<u64>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<u8>> for u8

§

type Output = Vector1<u8>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<u8>) -> Vector1<u8>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Vector1<usize>> for usize

§

type Output = Vector1<usize>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector1<usize>) -> Vector1<usize>

Performs the * operation. Read more
source§

impl<'a, S: BaseNum> Mul<S> for &'a Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: S) -> Vector1<S>

Performs the * operation. Read more
source§

impl<S: BaseNum> Mul<S> for Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: S) -> Vector1<S>

Performs the * operation. Read more
source§

impl Mul<Vector1<f32>> for f32

§

type Output = Vector1<f32>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<f32>) -> Vector1<f32>

Performs the * operation. Read more
source§

impl Mul<Vector1<f64>> for f64

§

type Output = Vector1<f64>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<f64>) -> Vector1<f64>

Performs the * operation. Read more
source§

impl Mul<Vector1<i16>> for i16

§

type Output = Vector1<i16>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<i16>) -> Vector1<i16>

Performs the * operation. Read more
source§

impl Mul<Vector1<i32>> for i32

§

type Output = Vector1<i32>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<i32>) -> Vector1<i32>

Performs the * operation. Read more
source§

impl Mul<Vector1<i64>> for i64

§

type Output = Vector1<i64>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<i64>) -> Vector1<i64>

Performs the * operation. Read more
source§

impl Mul<Vector1<i8>> for i8

§

type Output = Vector1<i8>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<i8>) -> Vector1<i8>

Performs the * operation. Read more
source§

impl Mul<Vector1<isize>> for isize

§

type Output = Vector1<isize>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<isize>) -> Vector1<isize>

Performs the * operation. Read more
source§

impl Mul<Vector1<u16>> for u16

§

type Output = Vector1<u16>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<u16>) -> Vector1<u16>

Performs the * operation. Read more
source§

impl Mul<Vector1<u32>> for u32

§

type Output = Vector1<u32>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<u32>) -> Vector1<u32>

Performs the * operation. Read more
source§

impl Mul<Vector1<u64>> for u64

§

type Output = Vector1<u64>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<u64>) -> Vector1<u64>

Performs the * operation. Read more
source§

impl Mul<Vector1<u8>> for u8

§

type Output = Vector1<u8>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<u8>) -> Vector1<u8>

Performs the * operation. Read more
source§

impl Mul<Vector1<usize>> for usize

§

type Output = Vector1<usize>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector1<usize>) -> Vector1<usize>

Performs the * operation. Read more
source§

impl<S: BaseNum + MulAssign<S>> MulAssign<S> for Vector1<S>

source§

fn mul_assign(&mut self, scalar: S)

Performs the *= operation. Read more
source§

impl<S: Neg<Output = S>> Neg for Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the - operator.
source§

fn neg(self) -> Vector1<S>

Performs the unary - operation. Read more
source§

impl<S: PartialEq> PartialEq<Vector1<S>> for Vector1<S>

source§

fn eq(&self, other: &Vector1<S>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: BaseFloat> RelativeEq<Vector1<S>> for Vector1<S>

source§

fn default_max_relative() -> S::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
source§

fn relative_eq( &self, other: &Self, epsilon: S::Epsilon, max_relative: S::Epsilon ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

The inverse of RelativeEq::relative_eq.
source§

impl<'a> Rem<&'a Vector1<f32>> for f32

§

type Output = Vector1<f32>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<f32>) -> Vector1<f32>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<f64>> for f64

§

type Output = Vector1<f64>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<f64>) -> Vector1<f64>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<i16>> for i16

§

type Output = Vector1<i16>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<i16>) -> Vector1<i16>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<i32>> for i32

§

type Output = Vector1<i32>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<i32>) -> Vector1<i32>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<i64>> for i64

§

type Output = Vector1<i64>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<i64>) -> Vector1<i64>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<i8>> for i8

§

type Output = Vector1<i8>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<i8>) -> Vector1<i8>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<isize>> for isize

§

type Output = Vector1<isize>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<isize>) -> Vector1<isize>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<u16>> for u16

§

type Output = Vector1<u16>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<u16>) -> Vector1<u16>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<u32>> for u32

§

type Output = Vector1<u32>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<u32>) -> Vector1<u32>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<u64>> for u64

§

type Output = Vector1<u64>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<u64>) -> Vector1<u64>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<u8>> for u8

§

type Output = Vector1<u8>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<u8>) -> Vector1<u8>

Performs the % operation. Read more
source§

impl<'a> Rem<&'a Vector1<usize>> for usize

§

type Output = Vector1<usize>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Vector1<usize>) -> Vector1<usize>

Performs the % operation. Read more
source§

impl<'a, S: BaseNum> Rem<S> for &'a Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the % operator.
source§

fn rem(self, other: S) -> Vector1<S>

Performs the % operation. Read more
source§

impl<S: BaseNum> Rem<S> for Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the % operator.
source§

fn rem(self, other: S) -> Vector1<S>

Performs the % operation. Read more
source§

impl Rem<Vector1<f32>> for f32

§

type Output = Vector1<f32>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<f32>) -> Vector1<f32>

Performs the % operation. Read more
source§

impl Rem<Vector1<f64>> for f64

§

type Output = Vector1<f64>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<f64>) -> Vector1<f64>

Performs the % operation. Read more
source§

impl Rem<Vector1<i16>> for i16

§

type Output = Vector1<i16>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<i16>) -> Vector1<i16>

Performs the % operation. Read more
source§

impl Rem<Vector1<i32>> for i32

§

type Output = Vector1<i32>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<i32>) -> Vector1<i32>

Performs the % operation. Read more
source§

impl Rem<Vector1<i64>> for i64

§

type Output = Vector1<i64>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<i64>) -> Vector1<i64>

Performs the % operation. Read more
source§

impl Rem<Vector1<i8>> for i8

§

type Output = Vector1<i8>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<i8>) -> Vector1<i8>

Performs the % operation. Read more
source§

impl Rem<Vector1<isize>> for isize

§

type Output = Vector1<isize>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<isize>) -> Vector1<isize>

Performs the % operation. Read more
source§

impl Rem<Vector1<u16>> for u16

§

type Output = Vector1<u16>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<u16>) -> Vector1<u16>

Performs the % operation. Read more
source§

impl Rem<Vector1<u32>> for u32

§

type Output = Vector1<u32>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<u32>) -> Vector1<u32>

Performs the % operation. Read more
source§

impl Rem<Vector1<u64>> for u64

§

type Output = Vector1<u64>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<u64>) -> Vector1<u64>

Performs the % operation. Read more
source§

impl Rem<Vector1<u8>> for u8

§

type Output = Vector1<u8>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<u8>) -> Vector1<u8>

Performs the % operation. Read more
source§

impl Rem<Vector1<usize>> for usize

§

type Output = Vector1<usize>

The resulting type after applying the % operator.
source§

fn rem(self, other: Vector1<usize>) -> Vector1<usize>

Performs the % operation. Read more
source§

impl<S: BaseNum + RemAssign<S>> RemAssign<S> for Vector1<S>

source§

fn rem_assign(&mut self, scalar: S)

Performs the %= operation. Read more
source§

impl<'a, 'b, S: BaseNum> Sub<&'a Vector1<S>> for &'b Point1<S>

§

type Output = Point1<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a Vector1<S>) -> Point1<S>

Performs the - operation. Read more
source§

impl<'a, 'b, S: BaseNum> Sub<&'a Vector1<S>> for &'b Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a Vector1<S>) -> Vector1<S>

Performs the - operation. Read more
source§

impl<'a, S: BaseNum> Sub<&'a Vector1<S>> for Point1<S>

§

type Output = Point1<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a Vector1<S>) -> Point1<S>

Performs the - operation. Read more
source§

impl<'a, S: BaseNum> Sub<&'a Vector1<S>> for Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a Vector1<S>) -> Vector1<S>

Performs the - operation. Read more
source§

impl<'a, S: BaseNum> Sub<Vector1<S>> for &'a Point1<S>

§

type Output = Point1<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: Vector1<S>) -> Point1<S>

Performs the - operation. Read more
source§

impl<'a, S: BaseNum> Sub<Vector1<S>> for &'a Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: Vector1<S>) -> Vector1<S>

Performs the - operation. Read more
source§

impl<S: BaseNum> Sub<Vector1<S>> for Point1<S>

§

type Output = Point1<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: Vector1<S>) -> Point1<S>

Performs the - operation. Read more
source§

impl<S: BaseNum> Sub<Vector1<S>> for Vector1<S>

§

type Output = Vector1<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: Vector1<S>) -> Vector1<S>

Performs the - operation. Read more
source§

impl<S: BaseNum + SubAssign<S>> SubAssign<Vector1<S>> for Point1<S>

source§

fn sub_assign(&mut self, vector: Vector1<S>)

Performs the -= operation. Read more
source§

impl<S: BaseNum + SubAssign<S>> SubAssign<Vector1<S>> for Vector1<S>

source§

fn sub_assign(&mut self, other: Vector1<S>)

Performs the -= operation. Read more
source§

impl<'a, S: 'a + BaseNum> Sum<&'a Vector1<S>> for Vector1<S>

source§

fn sum<I: Iterator<Item = &'a Vector1<S>>>(iter: I) -> Vector1<S>

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<S: BaseNum> Sum<Vector1<S>> for Vector1<S>

source§

fn sum<I: Iterator<Item = Vector1<S>>>(iter: I) -> Vector1<S>

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<S: BaseFloat> UlpsEq<Vector1<S>> for Vector1<S>

source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
source§

fn ulps_eq(&self, other: &Self, epsilon: S::Epsilon, max_ulps: u32) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
source§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
source§

impl<S: BaseNum> VectorSpace for Vector1<S>

§

type Scalar = S

The associated scalar.
source§

fn lerp(self, other: Self, amount: Self::Scalar) -> Self

Returns the result of linearly interpolating the vector towards other by the specified amount.
source§

impl<S: BaseNum> Zero for Vector1<S>

source§

fn zero() -> Vector1<S>

Returns the additive identity element of Self, 0. Read more
source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
source§

impl<S: Copy> Copy for Vector1<S>

source§

impl<S: Eq> Eq for Vector1<S>

source§

impl<S> StructuralEq for Vector1<S>

source§

impl<S> StructuralPartialEq for Vector1<S>

Auto Trait Implementations§

§

impl<S> RefUnwindSafe for Vector1<S>where S: RefUnwindSafe,

§

impl<S> Send for Vector1<S>where S: Send,

§

impl<S> Sync for Vector1<S>where S: Sync,

§

impl<S> Unpin for Vector1<S>where S: Unpin,

§

impl<S> UnwindSafe for Vector1<S>where S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. 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 Twhere 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> LowerBounded for Twhere T: Bounded,

source§

fn min_value() -> T

Returns the smallest finite number this type can represent
source§

impl<T> ToOwned for Twhere T: Clone,

§

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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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> UpperBounded for Twhere T: Bounded,

source§

fn max_value() -> T

Returns the largest finite number this type can represent
source§

impl<T, Rhs> NumAssignOps<Rhs> for Twhere T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for Twhere T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,