forked from M-Labs/nalgebra
Rotation::matrix_mut_unchecked may not cause UB
...because it isn't unsafe, so clarify the documentation to match.
This commit is contained in:
parent
b10711e66e
commit
1eeaf3526c
@ -199,9 +199,9 @@ impl<T: Scalar, const D: usize> Rotation<T, D> {
|
|||||||
|
|
||||||
/// A mutable reference to the underlying matrix representation of this rotation.
|
/// A mutable reference to the underlying matrix representation of this rotation.
|
||||||
///
|
///
|
||||||
/// This is suffixed by "_unchecked" because this allows the user to replace the matrix by another one that is
|
/// This is suffixed by "_unchecked" because this allows the user to replace the
|
||||||
/// non-square, non-inversible, or non-orthonormal. If one of those properties is broken,
|
/// matrix by another one that is non-inversible or non-orthonormal. If one of
|
||||||
/// subsequent method calls may be UB.
|
/// those properties is broken, subsequent method calls may return bogus results.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn matrix_mut_unchecked(&mut self) -> &mut SMatrix<T, D, D> {
|
pub fn matrix_mut_unchecked(&mut self) -> &mut SMatrix<T, D, D> {
|
||||||
&mut self.matrix
|
&mut self.matrix
|
||||||
|
Loading…
Reference in New Issue
Block a user