#[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>
impl<S> Vector1<S>
Trait Implementations§
source§impl<S: BaseFloat> AbsDiffEq<Vector1<S>> for Vector1<S>
impl<S: BaseFloat> AbsDiffEq<Vector1<S>> for Vector1<S>
source§fn default_epsilon() -> S::Epsilon
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
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
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq
.source§impl<S: BaseNum + AddAssign<S>> AddAssign<Vector1<S>> for Point1<S>
impl<S: BaseNum + AddAssign<S>> AddAssign<Vector1<S>> for Point1<S>
source§fn add_assign(&mut self, vector: Vector1<S>)
fn add_assign(&mut self, vector: Vector1<S>)
Performs the
+=
operation. Read moresource§impl<S: BaseNum + AddAssign<S>> AddAssign<Vector1<S>> for Vector1<S>
impl<S: BaseNum + AddAssign<S>> AddAssign<Vector1<S>> for Vector1<S>
source§fn add_assign(&mut self, other: Vector1<S>)
fn add_assign(&mut self, other: Vector1<S>)
Performs the
+=
operation. Read moresource§impl<S: Copy> Array for Vector1<S>
impl<S: Copy> Array for Vector1<S>
type Element = S
source§fn from_value(scalar: S) -> Vector1<S>
fn from_value(scalar: S) -> Vector1<S>
Construct a vector from a single value, replicating it. Read more
source§fn as_mut_ptr(&mut self) -> *mut Self::Element
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)
fn swap_elements(&mut self, i: usize, j: usize)
Swap the elements at indices
i
and j
in-place.source§impl<S: BaseNum + DivAssign<S>> DivAssign<S> for Vector1<S>
impl<S: BaseNum + DivAssign<S>> DivAssign<S> for Vector1<S>
source§fn div_assign(&mut self, scalar: S)
fn div_assign(&mut self, scalar: S)
Performs the
/=
operation. Read moresource§impl<S: BaseNum> ElementWise<S> for Vector1<S>
impl<S: BaseNum> ElementWise<S> for Vector1<S>
fn add_element_wise(self, rhs: S) -> Vector1<S>
fn sub_element_wise(self, rhs: S) -> Vector1<S>
fn mul_element_wise(self, rhs: S) -> Vector1<S>
fn div_element_wise(self, rhs: S) -> Vector1<S>
fn rem_element_wise(self, rhs: S) -> Vector1<S>
fn add_assign_element_wise(&mut self, rhs: S)
fn sub_assign_element_wise(&mut self, rhs: S)
fn mul_assign_element_wise(&mut self, rhs: S)
fn div_assign_element_wise(&mut self, rhs: S)
fn rem_assign_element_wise(&mut self, rhs: S)
source§impl<S: BaseNum> ElementWise<Vector1<S>> for Vector1<S>
impl<S: BaseNum> ElementWise<Vector1<S>> for Vector1<S>
fn add_element_wise(self, rhs: Vector1<S>) -> Vector1<S>
fn sub_element_wise(self, rhs: Vector1<S>) -> Vector1<S>
fn mul_element_wise(self, rhs: Vector1<S>) -> Vector1<S>
fn div_element_wise(self, rhs: Vector1<S>) -> Vector1<S>
fn rem_element_wise(self, rhs: Vector1<S>) -> Vector1<S>
fn add_assign_element_wise(&mut self, rhs: Vector1<S>)
fn sub_assign_element_wise(&mut self, rhs: Vector1<S>)
fn mul_assign_element_wise(&mut self, rhs: Vector1<S>)
fn div_assign_element_wise(&mut self, rhs: Vector1<S>)
fn rem_assign_element_wise(&mut self, rhs: Vector1<S>)
source§impl<S: BaseNum> InnerSpace for Vector1<S>
impl<S: BaseNum> InnerSpace for Vector1<S>
source§fn magnitude2(self) -> Self::Scalar
fn magnitude2(self) -> Self::Scalar
Returns the squared magnitude. Read more
source§fn project_on(self, other: Self) -> Self
fn project_on(self, other: Self) -> Self
Returns the
vector projection
of the current inner space projected onto the supplied argument.
source§impl<S: BaseNum> MetricSpace for Vector1<S>
impl<S: BaseNum> MetricSpace for Vector1<S>
source§impl<S: BaseNum + MulAssign<S>> MulAssign<S> for Vector1<S>
impl<S: BaseNum + MulAssign<S>> MulAssign<S> for Vector1<S>
source§fn mul_assign(&mut self, scalar: S)
fn mul_assign(&mut self, scalar: S)
Performs the
*=
operation. Read moresource§impl<S: PartialEq> PartialEq<Vector1<S>> for Vector1<S>
impl<S: PartialEq> PartialEq<Vector1<S>> for Vector1<S>
source§impl<S: BaseFloat> RelativeEq<Vector1<S>> for Vector1<S>
impl<S: BaseFloat> RelativeEq<Vector1<S>> for Vector1<S>
source§fn default_max_relative() -> S::Epsilon
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
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
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool
The inverse of
RelativeEq::relative_eq
.source§impl<S: BaseNum + RemAssign<S>> RemAssign<S> for Vector1<S>
impl<S: BaseNum + RemAssign<S>> RemAssign<S> for Vector1<S>
source§fn rem_assign(&mut self, scalar: S)
fn rem_assign(&mut self, scalar: S)
Performs the
%=
operation. Read moresource§impl<S: BaseNum + SubAssign<S>> SubAssign<Vector1<S>> for Point1<S>
impl<S: BaseNum + SubAssign<S>> SubAssign<Vector1<S>> for Point1<S>
source§fn sub_assign(&mut self, vector: Vector1<S>)
fn sub_assign(&mut self, vector: Vector1<S>)
Performs the
-=
operation. Read moresource§impl<S: BaseNum + SubAssign<S>> SubAssign<Vector1<S>> for Vector1<S>
impl<S: BaseNum + SubAssign<S>> SubAssign<Vector1<S>> for Vector1<S>
source§fn sub_assign(&mut self, other: Vector1<S>)
fn sub_assign(&mut self, other: Vector1<S>)
Performs the
-=
operation. Read moresource§impl<S: BaseFloat> UlpsEq<Vector1<S>> for Vector1<S>
impl<S: BaseFloat> UlpsEq<Vector1<S>> for Vector1<S>
source§impl<S: BaseNum> VectorSpace for Vector1<S>
impl<S: BaseNum> VectorSpace for Vector1<S>
impl<S: Copy> Copy for Vector1<S>
impl<S: Eq> Eq for Vector1<S>
impl<S> StructuralEq for Vector1<S>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more