glam_matrix_extras/
lib.rs

1//! Matrix types and utilities for [`glam`].
2
3#![warn(missing_docs)]
4#![no_std]
5
6mod ops;
7
8#[cfg(feature = "f32")]
9mod eigen;
10mod mat_ext;
11mod rectangular;
12mod symmetric;
13
14pub use eigen::*;
15pub use mat_ext::SquareMatExt;
16pub use rectangular::*;
17pub use symmetric::*;
18
19/// An error that can occur when converting matrices to other representations.
20#[derive(Clone, Copy, Debug, PartialEq, Eq)]
21pub enum MatConversionError {
22    /// Tried to convert a matrix to a symmetric matrix type, but the matrix is not symmetric.
23    Asymmetric,
24}
25
26impl core::fmt::Display for MatConversionError {
27    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
28        match self {
29            MatConversionError::Asymmetric => write!(f, "Matrix is not symmetric"),
30        }
31    }
32}