#[repr(C)]pub struct DMat2 {
pub m00: f64,
pub m01: f64,
pub m10: f64,
pub m11: f64,
}
Expand description
Double-precision 2x2 column major matrix.
Fields§
§m00: f64
§m01: f64
§m10: f64
§m11: f64
Implementations§
Source§impl DMat2
impl DMat2
Sourcepub fn determinant(self) -> f64
pub fn determinant(self) -> f64
Computes the matrix determinant.
Sourcepub fn inverse(self) -> DMat2
pub fn inverse(self) -> DMat2
Computes the matrix inverse.
§Panics
Panics if the matrix has no inverse (i.e. has zero determinant).
Sourcepub fn try_invert(self) -> Option<DMat2>
pub fn try_invert(self) -> Option<DMat2>
Attempts to compute the matrix inverse, returning None
if the matrix is
non-invertible (i.e. has zero determinant).
Trait Implementations§
Source§impl ApproxEq for DMat2
impl ApproxEq for DMat2
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Source§fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
impl Copy for DMat2
impl StructuralPartialEq for DMat2
Auto Trait Implementations§
impl Freeze for DMat2
impl RefUnwindSafe for DMat2
impl Send for DMat2
impl Sync for DMat2
impl Unpin for DMat2
impl UnwindSafe for DMat2
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