vec4

Struct vec4 

Source
pub struct vec4<T>(pub T, pub T, pub T, pub T);

Tuple Fields§

§0: T§1: T§2: T§3: T

Implementations§

Source§

impl<T> vec4<T>

Source

pub fn new(x: T, y: T, z: T, w: T) -> Self

Source

pub fn x(&self) -> &T

Source

pub fn y(&self) -> &T

Source

pub fn z(&self) -> &T

Source

pub fn w(&self) -> &T

Source

pub fn xy(&self) -> (&T, &T)

Source

pub fn yx(&self) -> (&T, &T)

Source

pub fn xz(&self) -> (&T, &T)

Source

pub fn zx(&self) -> (&T, &T)

Source

pub fn yz(&self) -> (&T, &T)

Source

pub fn zy(&self) -> (&T, &T)

Source

pub fn xyz(&self) -> (&T, &T, &T)

Source

pub fn zxy(&self) -> (&T, &T, &T)

Source

pub fn yzx(&self) -> (&T, &T, &T)

Source

pub fn yxz(&self) -> (&T, &T, &T)

Source

pub fn zyx(&self) -> (&T, &T, &T)

Source

pub fn xzy(&self) -> (&T, &T, &T)

Source

pub fn xw(&self) -> (&T, &T)

Source

pub fn wx(&self) -> (&T, &T)

Source

pub fn zw(&self) -> (&T, &T)

Source

pub fn wz(&self) -> (&T, &T)

Source

pub fn xyw(&self) -> (&T, &T, &T)

Source

pub fn wxy(&self) -> (&T, &T, &T)

Source

pub fn ywx(&self) -> (&T, &T, &T)

Source

pub fn yxw(&self) -> (&T, &T, &T)

Source

pub fn wyx(&self) -> (&T, &T, &T)

Source

pub fn xwy(&self) -> (&T, &T, &T)

Source

pub fn xwz(&self) -> (&T, &T, &T)

Source

pub fn zxw(&self) -> (&T, &T, &T)

Source

pub fn wzx(&self) -> (&T, &T, &T)

Source

pub fn wxz(&self) -> (&T, &T, &T)

Source

pub fn zwx(&self) -> (&T, &T, &T)

Source

pub fn xzw(&self) -> (&T, &T, &T)

Source

pub fn xyzw(&self) -> (&T, &T, &T, &T)

Source

pub fn wxyz(&self) -> (&T, &T, &T, &T)

Source

pub fn zwxy(&self) -> (&T, &T, &T, &T)

Source

pub fn yzwx(&self) -> (&T, &T, &T, &T)

Source

pub fn yxzw(&self) -> (&T, &T, &T, &T)

Source

pub fn wyxz(&self) -> (&T, &T, &T, &T)

Source

pub fn zwyx(&self) -> (&T, &T, &T, &T)

Source

pub fn xzwy(&self) -> (&T, &T, &T, &T)

Source

pub fn xywz(&self) -> (&T, &T, &T, &T)

Source

pub fn zxyw(&self) -> (&T, &T, &T, &T)

Source

pub fn wzxy(&self) -> (&T, &T, &T, &T)

Source

pub fn ywzx(&self) -> (&T, &T, &T, &T)

Source

pub fn xzyw(&self) -> (&T, &T, &T, &T)

Source

pub fn wxzy(&self) -> (&T, &T, &T, &T)

Source

pub fn ywxz(&self) -> (&T, &T, &T, &T)

Source

pub fn zywx(&self) -> (&T, &T, &T, &T)

Source

pub fn wyzx(&self) -> (&T, &T, &T, &T)

Source

pub fn xwyz(&self) -> (&T, &T, &T, &T)

Source

pub fn zxwy(&self) -> (&T, &T, &T, &T)

Source

pub fn yzxw(&self) -> (&T, &T, &T, &T)

Source

pub fn xwzy(&self) -> (&T, &T, &T, &T)

Source

pub fn yxwz(&self) -> (&T, &T, &T, &T)

Source

pub fn zyxw(&self) -> (&T, &T, &T, &T)

Source

pub fn wzyx(&self) -> (&T, &T, &T, &T)

Source

pub fn r(&self) -> &T

Source

pub fn g(&self) -> &T

Source

pub fn b(&self) -> &T

Source

pub fn a(&self) -> &T

Source

pub fn rg(&self) -> (&T, &T)

Source

pub fn gr(&self) -> (&T, &T)

Source

pub fn rb(&self) -> (&T, &T)

Source

pub fn br(&self) -> (&T, &T)

Source

pub fn rgb(&self) -> (&T, &T, &T)

Source

pub fn brg(&self) -> (&T, &T, &T)

Source

pub fn gbr(&self) -> (&T, &T, &T)

Source

pub fn grb(&self) -> (&T, &T, &T)

Source

pub fn bgr(&self) -> (&T, &T, &T)

Source

pub fn rbg(&self) -> (&T, &T, &T)

Source

pub fn rga(&self) -> (&T, &T, &T)

Source

pub fn arg(&self) -> (&T, &T, &T)

Source

pub fn gar(&self) -> (&T, &T, &T)

Source

pub fn gra(&self) -> (&T, &T, &T)

Source

pub fn agr(&self) -> (&T, &T, &T)

Source

pub fn rag(&self) -> (&T, &T, &T)

Source

pub fn rab(&self) -> (&T, &T, &T)

Source

pub fn bra(&self) -> (&T, &T, &T)

Source

pub fn abr(&self) -> (&T, &T, &T)

Source

pub fn rgba(&self) -> (&T, &T, &T, &T)

Source

pub fn argb(&self) -> (&T, &T, &T, &T)

Source

pub fn barg(&self) -> (&T, &T, &T, &T)

Source

pub fn gbar(&self) -> (&T, &T, &T, &T)

Source

pub fn grba(&self) -> (&T, &T, &T, &T)

Source

pub fn agrb(&self) -> (&T, &T, &T, &T)

Source

pub fn bagr(&self) -> (&T, &T, &T, &T)

Source

pub fn rbag(&self) -> (&T, &T, &T, &T)

Source

pub fn rgab(&self) -> (&T, &T, &T, &T)

Source

pub fn brga(&self) -> (&T, &T, &T, &T)

Source

pub fn abrg(&self) -> (&T, &T, &T, &T)

Source

pub fn gabr(&self) -> (&T, &T, &T, &T)

Source

pub fn bgra(&self) -> (&T, &T, &T, &T)

Source

pub fn abgr(&self) -> (&T, &T, &T, &T)

Source

pub fn rabg(&self) -> (&T, &T, &T, &T)

Source

pub fn grab(&self) -> (&T, &T, &T, &T)

Source

pub fn agbr(&self) -> (&T, &T, &T, &T)

Source

pub fn ragb(&self) -> (&T, &T, &T, &T)

Source

pub fn brag(&self) -> (&T, &T, &T, &T)

Source

pub fn gbra(&self) -> (&T, &T, &T, &T)

Trait Implementations§

Source§

impl<T: Add<Output = T>> Add for vec4<T>

Source§

type Output = vec4<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: AddAssign> AddAssign for vec4<T>

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<T: TBytes + Clone> Clone for vec4<T>

Source§

fn clone(&self) -> Self

Returns a duplicate 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<T: TBytes + Debug> Debug for vec4<T>

Source§

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

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

impl<T: Div<Output = T>> Div for vec4<T>

Source§

type Output = vec4<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: DivAssign> DivAssign for vec4<T>

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<T: Clone> From<(&T, &T, &T, &T)> for vec4<T>

Source§

fn from(value: (&T, &T, &T, &T)) -> Self

Converts to this type from the input type.
Source§

impl<T: Clone> From<(&mut T, &mut T, &mut T, &mut T)> for vec4<T>

Source§

fn from(value: (&mut T, &mut T, &mut T, &mut T)) -> Self

Converts to this type from the input type.
Source§

impl<T> From<(T, T, T, T)> for vec4<T>

Source§

fn from(value: (T, T, T, T)) -> Self

Converts to this type from the input type.
Source§

impl<T: Clone> From<T> for vec4<T>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl<T: Mul<Output = T>> Mul for vec4<T>

Source§

type Output = vec4<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: MulAssign> MulAssign for vec4<T>

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<T: Sub<Output = T>> Sub for vec4<T>

Source§

type Output = vec4<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: SubAssign> SubAssign for vec4<T>

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<T> TBytes for vec4<T>
where T: TBytes,

Source§

fn size(&self) -> usize

Source§

fn to_bytes(&self) -> Vec<u8>

Source§

fn from_bytes(bytes: &mut Vec<u8>) -> Option<Self>

Source§

fn from_bytes_ref(buffer: &[u8]) -> Option<Self>
where Self: Sized,

Source§

impl<T: TBytes + Copy> Copy for vec4<T>

Auto Trait Implementations§

§

impl<T> Freeze for vec4<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for vec4<T>
where T: RefUnwindSafe,

§

impl<T> Send for vec4<T>
where T: Send,

§

impl<T> Sync for vec4<T>
where T: Sync,

§

impl<T> Unpin for vec4<T>
where T: Unpin,

§

impl<T> UnwindSafe for vec4<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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

Source§

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.