Struct iron_shapes::matrix2d::Matrix2d[][src]

pub struct Matrix2d<T: CoordinateType> { /* fields omitted */ }

A 2x2 matrix of the form:

[[ m11, m12 ],
 [ m21, m22 ]]

Implementations

impl<T> Matrix2d<T> where
    T: CoordinateType
[src]

pub fn new(m11: T, m12: T, m21: T, m22: T) -> Self[src]

Create a new 2x2 matrix with entries of the form:

[[ m11, m12 ],
 [ m21, m22 ]]

pub fn identity() -> Self[src]

Return the identity matrix.

pub fn mul_scalar(&self, rhs: T) -> Self[src]

Compute product of the matrix with a scalar.

pub fn mul_column_vector(&self, rhs: Vector<T>) -> Vector<T>[src]

Compute matrix-column-vector multiplication. The vector is interpreted as column vector.

pub fn mul_matrix(&self, rhs: &Self) -> Self[src]

Matrix-matrix multiplication.

pub fn transpose(&self) -> Self[src]

Compute the transpose of the matrix.

pub fn determinant(&self) -> T[src]

Compute the determinant of this matrix.

pub fn is_identity(&self) -> bool[src]

Test if this matrix is the identity matrix.

pub fn is_unitary(&self) -> bool[src]

Test if this matrix is unitary.

pub fn try_inverse(&self) -> Option<Self>[src]

Compute the inverse matrix. None will be returned if the determinant is zero and the matrix is not invertible.

Trait Implementations

impl<T: Clone + CoordinateType> Clone for Matrix2d<T>[src]

impl<T: Debug + CoordinateType> Debug for Matrix2d<T>[src]

impl<T: CoordinateType> Default for Matrix2d<T>[src]

impl<T: Eq + CoordinateType> Eq for Matrix2d<T>[src]

impl<T: Hash + CoordinateType> Hash for Matrix2d<T>[src]

impl<T: PartialEq + CoordinateType> PartialEq<Matrix2d<T>> for Matrix2d<T>[src]

impl<T: CoordinateType> StructuralEq for Matrix2d<T>[src]

impl<T: CoordinateType> StructuralPartialEq for Matrix2d<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Matrix2d<T> where
    T: RefUnwindSafe

impl<T> Send for Matrix2d<T> where
    T: Send

impl<T> Sync for Matrix2d<T> where
    T: Sync

impl<T> Unpin for Matrix2d<T> where
    T: Unpin

impl<T> UnwindSafe for Matrix2d<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> TextType for T where
    T: Clone + Eq + Debug + Hash
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.