pub trait MatExt {
type Scalar;
// Required methods
fn inverse_or_zero(self) -> Self;
fn is_isotropic(&self, epsilon: Self::Scalar) -> bool;
}
Expand description
An extension trait for matrix types.
Required Associated Types§
Required Methods§
Sourcefn inverse_or_zero(self) -> Self
fn inverse_or_zero(self) -> Self
Computes the inverse of self
if self
is not zero,
and returns zero otherwise to avoid division by zero.
Sourcefn is_isotropic(&self, epsilon: Self::Scalar) -> bool
fn is_isotropic(&self, epsilon: Self::Scalar) -> bool
Checks if the matrix is isotropic, meaning that it is invariant under all rotations of the coordinate system.
For second-order tensors, this means that the diagonal elements are equal and the off-diagonal elements are zero.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.