pub struct Svd3 {
pub u: Mat3,
pub s: Vec3,
pub vt: Mat3,
}Expand description
The SVD of a 3x3 matrix (f32 precision).
Fields§
§u: Mat3The left orthogonal matrix U.
s: Vec3The singular values (diagonal entries of S), sorted in descending order.
vt: Mat3The transposed right orthogonal matrix V^T.
Implementations§
Source§impl Svd3
impl Svd3
Sourcepub fn from_matrix(a: Mat3) -> Self
pub fn from_matrix(a: Mat3) -> Self
Computes the SVD of a 3x3 matrix.
Returns the decomposition M = U * S * V^T where:
Uis an orthogonal matrix (left singular vectors as columns)Sis a diagonal matrix (stored as a vector of singular values)V^Tis the transpose of an orthogonal matrix
The singular values are sorted in descending order (s.x >= s.y >= s.z).
Trait Implementations§
impl Copy for Svd3
impl StructuralPartialEq for Svd3
Auto Trait Implementations§
impl Freeze for Svd3
impl RefUnwindSafe for Svd3
impl Send for Svd3
impl Sync for Svd3
impl Unpin for Svd3
impl UnwindSafe for Svd3
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.