[−][src]Struct coord::vec1::Vec1
Fields
x: T
Methods
impl<T: VecItem> Vec1<T>
[src]
pub fn new(x: T) -> Self
[src]
Creates a new Vec1 from a single component
pub fn elements(&self) -> [T; 1]
[src]
Returns the elements of the vector as an array
pub fn map<U: VecItem, F: Fn(T) -> U>(&self, f: F) -> Vec1<U>
[src]
Apply an operation to all elements of this vector, returning the result
pub fn convert_to<U: VecItem + From<T>>(&self) -> Vec1<U>
[src]
Trait Implementations
impl<T> VecNum for Vec1<T> where
T: VecItem + Num,
[src]
T: VecItem + Num,
impl<T> VecInt for Vec1<T> where
T: VecItem + Integer,
[src]
T: VecItem + Integer,
impl<T> VecSigned for Vec1<T> where
T: VecItem + Signed,
[src]
T: VecItem + Signed,
fn snake_length(&self) -> Self::Item
[src]
impl<T> VecFloat for Vec1<T> where
T: VecItem + Float,
[src]
T: VecItem + Float,
fn length(&self) -> Self::Item
[src]
fn norm(&self) -> Self
[src]
fn floor(&self) -> Self
[src]
fn ceil(&self) -> Self
[src]
fn round(&self) -> Self
[src]
impl<T: VecItem> Vector for Vec1<T>
[src]
type Item = T
impl<T: VecItem> From<T> for Vec1<T>
[src]
impl<T: VecItem> From<[T; 1]> for Vec1<T>
[src]
impl<T: VecItem + Display> Display for Vec1<T>
[src]
impl<T: VecItem + Debug> Debug for Vec1<T>
[src]
impl<T> Div<Vec1<T>> for Vec1<T> where
T: VecItem + Div,
T::Output: VecItem + Div,
[src]
T: VecItem + Div,
T::Output: VecItem + Div,
type Output = Vec1<T::Output>
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Vec1<T::Output>
[src]
impl<T> Div<T> for Vec1<T> where
T: VecItem + Div,
T::Output: VecItem + Div,
[src]
T: VecItem + Div,
T::Output: VecItem + Div,
type Output = Vec1<T::Output>
The resulting type after applying the /
operator.
fn div(self, other: T) -> Vec1<T::Output>
[src]
impl<T> Sub<Vec1<T>> for Vec1<T> where
T: VecItem + Sub,
T::Output: VecItem + Sub,
[src]
T: VecItem + Sub,
T::Output: VecItem + Sub,
type Output = Vec1<T::Output>
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Vec1<T::Output>
[src]
impl<T> Sub<T> for Vec1<T> where
T: VecItem + Sub,
T::Output: VecItem + Sub,
[src]
T: VecItem + Sub,
T::Output: VecItem + Sub,
type Output = Vec1<T::Output>
The resulting type after applying the -
operator.
fn sub(self, other: T) -> Vec1<T::Output>
[src]
impl<T: PartialEq + VecItem> PartialEq<Vec1<T>> for Vec1<T>
[src]
impl<T: Eq + VecItem> Eq for Vec1<T>
[src]
impl<T> Add<Vec1<T>> for Vec1<T> where
T: VecItem + Add,
T::Output: VecItem + Add,
[src]
T: VecItem + Add,
T::Output: VecItem + Add,
type Output = Vec1<T::Output>
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Vec1<T::Output>
[src]
impl<T> Add<T> for Vec1<T> where
T: VecItem + Add,
T::Output: VecItem + Add,
[src]
T: VecItem + Add,
T::Output: VecItem + Add,
type Output = Vec1<T::Output>
The resulting type after applying the +
operator.
fn add(self, other: T) -> Vec1<T::Output>
[src]
impl<T> Mul<Vec1<T>> for Vec1<T> where
T: VecItem + Mul,
T::Output: VecItem + Mul,
[src]
T: VecItem + Mul,
T::Output: VecItem + Mul,
type Output = Vec1<T::Output>
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Vec1<T::Output>
[src]
impl<T> Mul<T> for Vec1<T> where
T: VecItem + Mul,
T::Output: VecItem + Mul,
[src]
T: VecItem + Mul,
T::Output: VecItem + Mul,
type Output = Vec1<T::Output>
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Vec1<T::Output>
[src]
impl<T> AddAssign<Vec1<T>> for Vec1<T> where
T: VecItem + Add<Output = T>,
[src]
T: VecItem + Add<Output = T>,
fn add_assign(&mut self, other: Self)
[src]
impl<T> AddAssign<T> for Vec1<T> where
T: VecItem + Add<Output = T>,
[src]
T: VecItem + Add<Output = T>,
fn add_assign(&mut self, other: T)
[src]
impl<T> SubAssign<Vec1<T>> for Vec1<T> where
T: VecItem + Sub<Output = T>,
[src]
T: VecItem + Sub<Output = T>,
fn sub_assign(&mut self, other: Self)
[src]
impl<T> SubAssign<T> for Vec1<T> where
T: VecItem + Sub<Output = T>,
[src]
T: VecItem + Sub<Output = T>,
fn sub_assign(&mut self, other: T)
[src]
impl<T> MulAssign<Vec1<T>> for Vec1<T> where
T: VecItem + Mul<Output = T>,
[src]
T: VecItem + Mul<Output = T>,
fn mul_assign(&mut self, other: Self)
[src]
impl<T> MulAssign<T> for Vec1<T> where
T: VecItem + Mul<Output = T>,
[src]
T: VecItem + Mul<Output = T>,
fn mul_assign(&mut self, other: T)
[src]
impl<T> DivAssign<Vec1<T>> for Vec1<T> where
T: VecItem + Div<Output = T>,
[src]
T: VecItem + Div<Output = T>,
fn div_assign(&mut self, other: Self)
[src]
impl<T> DivAssign<T> for Vec1<T> where
T: VecItem + Div<Output = T>,
[src]
T: VecItem + Div<Output = T>,
fn div_assign(&mut self, other: T)
[src]
impl<T: Hash + VecItem> Hash for Vec1<T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Copy + VecItem> Copy for Vec1<T>
[src]
impl<T: Clone + VecItem> Clone for Vec1<T>
[src]
impl<T: Default + VecItem> Default for Vec1<T>
[src]
Auto Trait Implementations
impl<T> Unpin for Vec1<T> where
T: Unpin,
T: Unpin,
impl<T> Send for Vec1<T> where
T: Send,
T: Send,
impl<T> Sync for Vec1<T> where
T: Sync,
T: Sync,
impl<T> UnwindSafe for Vec1<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for Vec1<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<V> VecDot for V where
V: Copy + VecNum + Mul<V, Output = V>,
<V as Vector>::Item: VecItem,
<V as Vector>::Item: Num,
[src]
V: Copy + VecNum + Mul<V, Output = V>,
<V as Vector>::Item: VecItem,
<V as Vector>::Item: Num,
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,