pub struct Matrix3<T> {
pub data: [[T; 3]; 3],
}Expand description
A 3x3 matrix stored in row-major order.
Fields§
§data: [[T; 3]; 3]data[row][col]
Implementations§
Source§impl Matrix3<f64>
impl Matrix3<f64>
Sourcepub fn from_columns(
c0: &Vector3<f64>,
c1: &Vector3<f64>,
c2: &Vector3<f64>,
) -> Self
pub fn from_columns( c0: &Vector3<f64>, c1: &Vector3<f64>, c2: &Vector3<f64>, ) -> Self
Build from three column vectors (nalgebra compat).
Sourcepub fn from_iterator<I: IntoIterator<Item = f64>>(iter: I) -> Self
pub fn from_iterator<I: IntoIterator<Item = f64>>(iter: I) -> Self
Build from a column-major iterator (nalgebra compat: column-major flat).
Sourcepub fn determinant(&self) -> f64
pub fn determinant(&self) -> f64
Determinant.
Sourcepub fn try_inverse(&self) -> Option<Self>
pub fn try_inverse(&self) -> Option<Self>
Try to invert.
Trait Implementations§
Source§impl AddAssign for Matrix3<f64>
impl AddAssign for Matrix3<f64>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreimpl<T: Copy> Copy for Matrix3<T>
Source§impl<'de, T> Deserialize<'de> for Matrix3<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Matrix3<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: PartialEq> PartialEq for Matrix3<T>
impl<T: PartialEq> PartialEq for Matrix3<T>
impl<T> 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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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