pub struct Matrix3<T: CoordType> {
pub m11: T,
pub m12: T,
pub m13: T,
pub m21: T,
pub m22: T,
pub m23: T,
pub m31: T,
pub m32: T,
pub m33: T,
}Expand description
3x3 matrix of the form. [[ m11, m12, m13 ], [ m21, m22, m23 ], [ m31, m32, m33 ]]
Fields§
§m11: T§m12: T§m13: T§m21: T§m22: T§m23: T§m31: T§m32: T§m33: TImplementations§
Source§impl<T> Matrix3<T>where
T: CoordType,
impl<T> Matrix3<T>where
T: CoordType,
Sourcepub fn new(
[[m11, m12, m13], [m21, m22, m23], [m31, m32, m33]]: [[T; 3]; 3],
) -> Self
pub fn new( [[m11, m12, m13], [m21, m22, m23], [m31, m32, m33]]: [[T; 3]; 3], ) -> Self
Create a new 3x3 matrix with entries of the form: [[ m11, m12, m13 ], [ m21, m22, m23 ], [ m31, m32, m33 ]]
pub fn identity() -> Self
pub fn scalar_mul(&self, rhs: T) -> Self
pub fn add(&self, rhs: &Self) -> Self
pub fn mul_vec(&self, rhs: &(T, T, T)) -> (T, T, T)
pub fn mat_mul(&self, rhs: &Self) -> Self
pub fn transpose(&self) -> Self
pub fn is_identity(&self) -> bool
pub fn is_unitary(&self) -> bool
pub fn determinant(&self) -> T
pub fn try_inverse(&self) -> Option<Self>
Trait Implementations§
impl<T: Eq + CoordType> Eq for Matrix3<T>
impl<T: PartialEq + CoordType> StructuralPartialEq for Matrix3<T>
Auto Trait Implementations§
impl<T> Freeze for Matrix3<T>where
T: Freeze,
impl<T> RefUnwindSafe for Matrix3<T>where
T: RefUnwindSafe,
impl<T> Send for Matrix3<T>where
T: Send,
impl<T> Sync for Matrix3<T>where
T: Sync,
impl<T> Unpin for Matrix3<T>where
T: Unpin,
impl<T> UnsafeUnpin for Matrix3<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Matrix3<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more