diff --git a/libs/main/math/pimathmatrix.h b/libs/main/math/pimathmatrix.h index 73993dec..9dd8ee7c 100644 --- a/libs/main/math/pimathmatrix.h +++ b/libs/main/math/pimathmatrix.h @@ -882,7 +882,7 @@ public: * * @param cols is number of matrix column uint type * @param rows is number of matrix row uint type - * @return identity matrix of type PIMathMatrix + * @return identity matrix(cols,rows) */ static _CMatrix identity(const uint cols, const uint rows) { _CMatrix tm(cols, rows); @@ -890,9 +890,17 @@ public: return tm; } + /** + * @brief Creates a matrix filled by zeros + * + * @param cols is number of matrix column uint type + * @param rows is number of matrix row uint type + * @return zero matrix(cols,rows) + */ static _CMatrix zero(const uint cols, const uint rows) { - _V2D::resize(rows, cols); - fill(Type(0)); + _CMatrix tm(cols, rows); + tm.fill(Type(0)); + return tm; } /**