Struct iron_shapes::matrix2d::Matrix2d [−][src]
A 2x2 matrix of the form:
[[ m11, m12 ],
[ m21, m22 ]]
Implementations
impl<T> Matrix2d<T> where
T: CoordinateType,
[src]
T: CoordinateType,
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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,
T: RefUnwindSafe,
impl<T> Send for Matrix2d<T> where
T: Send,
T: Send,
impl<T> Sync for Matrix2d<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Matrix2d<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Matrix2d<T> where
T: UnwindSafe,
T: UnwindSafe,
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> TextType for T where
T: Clone + Eq + Debug + Hash,
[src]
T: Clone + Eq + Debug + Hash,
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>,