Mat3x2

Struct Mat3x2 

Source
pub struct Mat3x2<T>
where T: Copy,
{ pub data: [T; 6], }

Fields§

§data: [T; 6]

Implementations§

Source§

impl<T> Mat3x2<T>
where T: Copy + Default,

Source

pub fn new() -> Mat3x2<T>

Source§

impl<T> Mat3x2<T>
where T: Copy,

Source

pub fn from_array(a: [T; 6]) -> Mat3x2<T>

Source

pub fn from_array_ref(a: &[T; 6]) -> Mat3x2<T>

Source

pub fn from_slice(s: &[T]) -> Option<Mat3x2<T>>

Source

pub fn from_map<F>(f: F) -> Mat3x2<T>
where F: Fn(usize, usize) -> T,

Source

pub fn from_scalar(v: T) -> Mat3x2<T>

Source§

impl<'a, T> Mat3x2<T>
where T: Copy,

Source

pub fn iter(&'a self) -> Iter<'a, T>

Source§

impl<'a, T> Mat3x2<T>
where T: Copy,

Source

pub fn iter_mut(&'a mut self) -> IterMut<'a, T>

Source§

impl<T> Mat3x2<T>
where T: Copy,

Source

pub fn map<F, S>(self, f: F) -> Mat3x2<S>
where F: Fn(T) -> S, S: Copy,

Source§

impl<T> Mat3x2<T>
where T: Copy + Zero,

Source

pub fn zero() -> Mat3x2<T>

Source

pub fn is_zero(&self) -> bool

Source§

impl<T> Mat3x2<T>
where T: Copy,

Source

pub fn transpose(self) -> Mat2x3<T>

Source§

impl<T> Mat3x2<T>
where T: Copy,

Source

pub fn row(self, j: usize) -> Vec3<T>

Source

pub fn col(self, i: usize) -> Vec2<T>

Source§

impl<T> Mat3x2<T>
where T: Copy,

Source

pub fn from(v00: T, v01: T, v10: T, v11: T, v20: T, v21: T) -> Mat3x2<T>

Trait Implementations§

Source§

impl<T> Add for Mat3x2<T>
where T: Copy + Num<Output = T> + Add,

Source§

type Output = Mat3x2<T>

The resulting type after applying the + operator.
Source§

fn add(self, mat: Mat3x2<T>) -> <Mat3x2<T> as Add>::Output

Performs the + operation. Read more
Source§

impl<T> AddAssign for Mat3x2<T>
where T: Copy + Num<Output = T> + Add,

Source§

fn add_assign(&mut self, mat: Mat3x2<T>)

Performs the += operation. Read more
Source§

impl<T> Clone for Mat3x2<T>
where T: Clone + Copy,

Source§

fn clone(&self) -> Mat3x2<T>

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> Debug for Mat3x2<T>
where T: Debug + Copy,

Source§

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

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

impl<T> Default for Mat3x2<T>
where T: Copy + Default,

Source§

fn default() -> Mat3x2<T>

Returns the “default value” for a type. Read more
Source§

impl<T> Display for Mat3x2<T>
where T: Copy + Display,

Source§

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

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

impl<T> Div<T> for Mat3x2<T>
where T: Copy + Num<Output = T> + Div,

Source§

type Output = Mat3x2<T>

The resulting type after applying the / operator.
Source§

fn div(self, a: T) -> <Mat3x2<T> as Div<T>>::Output

Performs the / operation. Read more
Source§

impl<T> Div for Mat3x2<T>
where T: Copy + Num<Output = T> + Div,

Source§

type Output = Mat3x2<T>

The resulting type after applying the / operator.
Source§

fn div(self, mat: Mat3x2<T>) -> <Mat3x2<T> as Div>::Output

Performs the / operation. Read more
Source§

impl<T> DivAssign<T> for Mat3x2<T>
where T: Copy + Num<Output = T> + Div,

Source§

fn div_assign(&mut self, a: T)

Performs the /= operation. Read more
Source§

impl<T> DivAssign for Mat3x2<T>
where T: Copy + Num<Output = T> + Div,

Source§

fn div_assign(&mut self, mat: Mat3x2<T>)

Performs the /= operation. Read more
Source§

impl<T> Dot<Mat2x3<T>> for Mat3x2<T>
where T: Copy + Num,

Source§

type Output = Mat2x2<T>

Source§

fn dot(self, mat: Mat2x3<T>) -> <Mat3x2<T> as Dot<Mat2x3<T>>>::Output

Source§

impl<T> Dot<Mat3x2<T>> for Mat2x2<T>
where T: Copy + Num,

Source§

type Output = Mat3x2<T>

Source§

fn dot(self, mat: Mat3x2<T>) -> <Mat2x2<T> as Dot<Mat3x2<T>>>::Output

Source§

impl<T> Dot<Mat3x2<T>> for Mat2x3<T>
where T: Copy + Num,

Source§

type Output = Mat3x3<T>

Source§

fn dot(self, mat: Mat3x2<T>) -> <Mat2x3<T> as Dot<Mat3x2<T>>>::Output

Source§

impl<T> Dot<Mat3x2<T>> for Mat2x4<T>
where T: Copy + Num,

Source§

type Output = Mat3x4<T>

Source§

fn dot(self, mat: Mat3x2<T>) -> <Mat2x4<T> as Dot<Mat3x2<T>>>::Output

Source§

impl<T> Dot<Mat3x2<T>> for Vec2<T>
where T: Copy + Num,

Source§

type Output = Vec3<T>

Source§

fn dot(self, mat: Mat3x2<T>) -> <Vec2<T> as Dot<Mat3x2<T>>>::Output

Source§

impl<T> Dot<Mat3x3<T>> for Mat3x2<T>
where T: Copy + Num,

Source§

type Output = Mat3x2<T>

Source§

fn dot(self, mat: Mat3x3<T>) -> <Mat3x2<T> as Dot<Mat3x3<T>>>::Output

Source§

impl<T> Dot<Mat4x3<T>> for Mat3x2<T>
where T: Copy + Num,

Source§

type Output = Mat4x2<T>

Source§

fn dot(self, mat: Mat4x3<T>) -> <Mat3x2<T> as Dot<Mat4x3<T>>>::Output

Source§

impl<T> Dot<Vec3<T>> for Mat3x2<T>
where T: Copy + Num,

Source§

type Output = Vec2<T>

Source§

fn dot(self, vec: Vec3<T>) -> <Mat3x2<T> as Dot<Vec3<T>>>::Output

Source§

impl<T> Index<(usize, usize)> for Mat3x2<T>
where T: Copy,

Source§

type Output = T

The returned type after indexing.
Source§

fn index( &self, ij: (usize, usize), ) -> &<Mat3x2<T> as Index<(usize, usize)>>::Output

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

impl<T> IndexMut<(usize, usize)> for Mat3x2<T>
where T: Copy,

Source§

fn index_mut( &mut self, ij: (usize, usize), ) -> &mut <Mat3x2<T> as Index<(usize, usize)>>::Output

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

impl<'a, T> IntoIterator for &'a Mat3x2<T>
where T: Copy,

Source§

type Item = &'a T

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <&'a Mat3x2<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T> IntoIterator for &'a mut Mat3x2<T>
where T: Copy,

Source§

type Item = &'a mut T

The type of the elements being iterated over.
Source§

type IntoIter = IterMut<'a, T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <&'a mut Mat3x2<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> Mul<T> for Mat3x2<T>
where T: Copy + Num<Output = T> + Mul,

Source§

type Output = Mat3x2<T>

The resulting type after applying the * operator.
Source§

fn mul(self, a: T) -> <Mat3x2<T> as Mul<T>>::Output

Performs the * operation. Read more
Source§

impl<T> Mul for Mat3x2<T>
where T: Copy + Num<Output = T> + Mul,

Source§

type Output = Mat3x2<T>

The resulting type after applying the * operator.
Source§

fn mul(self, mat: Mat3x2<T>) -> <Mat3x2<T> as Mul>::Output

Performs the * operation. Read more
Source§

impl<T> MulAssign<T> for Mat3x2<T>
where T: Copy + Num<Output = T> + Mul,

Source§

fn mul_assign(&mut self, a: T)

Performs the *= operation. Read more
Source§

impl<T> MulAssign for Mat3x2<T>
where T: Copy + Num<Output = T> + Mul,

Source§

fn mul_assign(&mut self, mat: Mat3x2<T>)

Performs the *= operation. Read more
Source§

impl<T> Neg for Mat3x2<T>
where T: Copy + Num + Signed,

Source§

type Output = Mat3x2<T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> <Mat3x2<T> as Neg>::Output

Performs the unary - operation. Read more
Source§

impl<T> PartialEq for Mat3x2<T>
where T: PartialEq + Copy,

Source§

fn eq(&self, other: &Mat3x2<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Rem<T> for Mat3x2<T>
where T: Copy + Num<Output = T> + Rem,

Source§

type Output = Mat3x2<T>

The resulting type after applying the % operator.
Source§

fn rem(self, a: T) -> <Mat3x2<T> as Rem<T>>::Output

Performs the % operation. Read more
Source§

impl<T> Rem for Mat3x2<T>
where T: Copy + Num<Output = T> + Rem,

Source§

type Output = Mat3x2<T>

The resulting type after applying the % operator.
Source§

fn rem(self, mat: Mat3x2<T>) -> <Mat3x2<T> as Rem>::Output

Performs the % operation. Read more
Source§

impl<T> RemAssign<T> for Mat3x2<T>
where T: Copy + Num<Output = T> + Rem,

Source§

fn rem_assign(&mut self, a: T)

Performs the %= operation. Read more
Source§

impl<T> RemAssign for Mat3x2<T>
where T: Copy + Num<Output = T> + Rem,

Source§

fn rem_assign(&mut self, mat: Mat3x2<T>)

Performs the %= operation. Read more
Source§

impl<T> Sub for Mat3x2<T>
where T: Copy + Num<Output = T> + Sub,

Source§

type Output = Mat3x2<T>

The resulting type after applying the - operator.
Source§

fn sub(self, mat: Mat3x2<T>) -> <Mat3x2<T> as Sub>::Output

Performs the - operation. Read more
Source§

impl<T> SubAssign for Mat3x2<T>
where T: Copy + Num<Output = T> + Sub,

Source§

fn sub_assign(&mut self, mat: Mat3x2<T>)

Performs the -= operation. Read more
Source§

impl<T> Zero for Mat3x2<T>
where T: Copy + Num + Zero,

Source§

fn zero() -> Mat3x2<T>

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<T> Copy for Mat3x2<T>
where T: Copy,

Source§

impl<T> StructuralPartialEq for Mat3x2<T>
where T: Copy,

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<T> UnwindSafe for Mat3x2<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<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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

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

Source§

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