Struct vectory::V2xu8 [−][src]
A 2D vector type with elements of type u8.
Implementations
impl V2xu8[src]
pub const LANES: usize[src]
The number of lanes in this vector.
pub const ZERO: V2xu8[src]
A vector with all its elements set to zero.
pub const ONE: V2xu8[src]
A vector with all its elements set to one.
pub fn new(a0: u8, a1: u8) -> Self[src]
Constructs a new vector with the given values.
pub fn splat(value: u8) -> Self[src]
Construct a new vector by setting each of its element to the given value.
pub fn unit_0() -> V2xu8[src]
Returns a unit vector which points along the 0 axis.
pub fn unit_1() -> V2xu8[src]
Returns a unit vector which points along the 1 axis.
pub fn as_slice(&self) -> &[u8][src]
Views this vector as an immutable slice.
pub fn as_mut_slice(&mut self) -> &mut [u8][src]
Views this vector as a mutable slice.
pub fn sum(self) -> u8[src]
Returns the sum of all elements in this vector.
pub fn product(self) -> u8[src]
Returns the product of all elements in this vector.
pub fn dot(self, other: Self) -> u8[src]
Returns the dot product between self and other.
pub fn length_squared(self) -> u8[src]
Returns the sqaured length of this vector.
pub fn min(self, other: Self) -> Self[src]
Returns a vector containing the mininum values for each elements of self
and other.
pub fn max(self, other: Self) -> Self[src]
Returns a vector containing the maximun values for each elements of self
and other.
pub fn min_elem(self) -> u8[src]
Returns the smallest element in this vector.
pub fn max_elem(self) -> u8[src]
Returns the largest element in this vector.
pub fn apply<F>(&mut self, f: F) where
F: FnMut(u8) -> u8, [src]
F: FnMut(u8) -> u8,
Applies the function f to each element in order, in-place.
pub fn clamp(self, min: Self, max: Self) -> Self[src]
Restricts each element in self to a certain interval given by the
corresponing element in min and max.
Panics
For each corresponing element in min and max, panics if min > max, min
is NaN, or max is NaN.
Trait Implementations
impl Add<V2xu8> for V2xu8[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, rhs: Self) -> Self::Output[src]
impl Add<V2xu8> for u8[src]
type Output = V2xu8
The resulting type after applying the + operator.
fn add(self, rhs: V2xu8) -> Self::Output[src]
impl AddAssign<V2xu8> for V2xu8[src]
fn add_assign(&mut self, rhs: Self)[src]
impl AsMut<[u8]> for V2xu8[src]
impl AsMut<V2xu8> for V2xu8[src]
impl AsRef<[u8]> for V2xu8[src]
impl AsRef<V2xu8> for V2xu8[src]
impl Borrow<[u8]> for V2xu8[src]
impl BorrowMut<[u8]> for V2xu8[src]
fn borrow_mut(&mut self) -> &mut [u8][src]
impl Clone for V2xu8[src]
impl Copy for V2xu8[src]
impl Deref for V2xu8[src]
impl DerefMut for V2xu8[src]
impl Div<V2xu8> for V2xu8[src]
type Output = Self
The resulting type after applying the / operator.
fn div(self, rhs: Self) -> Self::Output[src]
impl Div<u8> for V2xu8[src]
type Output = Self
The resulting type after applying the / operator.
fn div(self, rhs: u8) -> Self::Output[src]
impl DivAssign<V2xu8> for V2xu8[src]
fn div_assign(&mut self, rhs: Self)[src]
impl DivAssign<u8> for V2xu8[src]
fn div_assign(&mut self, rhs: u8)[src]
impl From<[u8; 2]> for V2xu8[src]
impl From<(u8, u8)> for V2xu8[src]
impl From<u8> for V2xu8[src]
impl Into<[u8; 2]> for V2xu8[src]
impl Into<(u8, u8)> for V2xu8[src]
impl Mul<V2xu8> for V2xu8[src]
type Output = Self
The resulting type after applying the * operator.
fn mul(self, rhs: Self) -> Self::Output[src]
impl Mul<V2xu8> for u8[src]
type Output = V2xu8
The resulting type after applying the * operator.
fn mul(self, rhs: V2xu8) -> Self::Output[src]
impl Mul<u8> for V2xu8[src]
type Output = Self
The resulting type after applying the * operator.
fn mul(self, rhs: u8) -> Self::Output[src]
impl MulAssign<V2xu8> for V2xu8[src]
fn mul_assign(&mut self, rhs: Self)[src]
impl MulAssign<u8> for V2xu8[src]
fn mul_assign(&mut self, rhs: u8)[src]
impl PartialEq<V2xu8> for V2xu8[src]
impl StructuralPartialEq for V2xu8[src]
impl Sub<V2xu8> for V2xu8[src]
type Output = Self
The resulting type after applying the - operator.
fn sub(self, rhs: Self) -> Self::Output[src]
impl SubAssign<V2xu8> for V2xu8[src]
fn sub_assign(&mut self, rhs: Self)[src]
Auto Trait Implementations
impl RefUnwindSafe for V2xu8
impl Send for V2xu8
impl Sync for V2xu8
impl Unpin for V2xu8
impl UnwindSafe for V2xu8
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut 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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,