diff --git a/src/Magnum/Math/Algorithms/GramSchmidt.h b/src/Magnum/Math/Algorithms/GramSchmidt.h index dd289e58d..e095983c4 100644 --- a/src/Magnum/Math/Algorithms/GramSchmidt.h +++ b/src/Magnum/Math/Algorithms/GramSchmidt.h @@ -53,8 +53,15 @@ the process works as follows, with @f$ \boldsymbol{v}_k @f$ being columns of Note that the above is not performed directly due to numerical instability, the stable [modified Gram-Schmidt](https://en.wikipedia.org/wiki/Gram–Schmidt_process#Numerical_stability) algorithm is used instead. -@see @ref gramSchmidtOrthogonalize(), @ref gramSchmidtOrthonormalizeInPlace(), - @ref Vector::projected() + +@attention Note that while this operation produces orthogonal column vectors, + it doesn't produce an [orthogonal matrix](https://en.wikipedia.org/wiki/Orthogonal_matrix) + --- an orthogonal matrix, as confusing as it may sound, has its column + vectors normalized. To produce an orthogonal matrix (for which + @ref Matrix::isOrthogonal() returns @cpp true @ce), use + @ref gramSchmidtOrthonormalizeInPlace() instead. + +@see @ref gramSchmidtOrthogonalize(), @ref Vector::projected() */ template void gramSchmidtOrthogonalizeInPlace(RectangularMatrix& matrix) { static_assert(cols <= rows, "Unsupported matrix aspect ratio"); @@ -69,6 +76,13 @@ template void gramSchmidtOrthogonal Unlike @ref gramSchmidtOrthogonalizeInPlace() returns the modified matrix instead of performing the orthogonalization in-place. + +@attention Note that while this operation produces orthogonal column vectors, + it doesn't produce an [orthogonal matrix](https://en.wikipedia.org/wiki/Orthogonal_matrix) + --- an orthogonal matrix, as confusing as it may sound, has its column + vectors normalized. To produce an orthogonal matrix (for which + @ref Matrix::isOrthogonal() returns @cpp true @ce), use + @ref gramSchmidtOrthonormalize() instead. */ template RectangularMatrix gramSchmidtOrthogonalize(RectangularMatrix matrix) { gramSchmidtOrthogonalizeInPlace(matrix); diff --git a/src/Magnum/Math/Matrix.h b/src/Magnum/Math/Matrix.h index 43d4797bd..c364838db 100644 --- a/src/Magnum/Math/Matrix.h +++ b/src/Magnum/Math/Matrix.h @@ -122,12 +122,16 @@ template class Matrix: public RectangularMatrix