diff --git a/src/linalg/inverse.rs b/src/linalg/inverse.rs index f07be14a..91d45587 100644 --- a/src/linalg/inverse.rs +++ b/src/linalg/inverse.rs @@ -8,7 +8,11 @@ use crate::base::{DefaultAllocator, OMatrix, SquareMatrix}; use crate::linalg::lu; impl> SquareMatrix { - /// Attempts to invert this matrix. + /// Attempts to invert this square matrix. + /// + /// # Panics + /// + /// Panics if `self` isn’t a square matrix. #[inline] #[must_use = "Did you mean to use try_inverse_mut()?"] pub fn try_inverse(self) -> Option> @@ -25,8 +29,12 @@ impl> SquareMatrix { } impl> SquareMatrix { - /// Attempts to invert this matrix in-place. Returns `false` and leaves `self` untouched if + /// Attempts to invert this square matrix in-place. Returns `false` and leaves `self` untouched if /// inversion fails. + /// + /// # Panics + /// + /// Panics if `self` isn’t a square matrix. #[inline] pub fn try_inverse_mut(&mut self) -> bool where