From 6789d068e355e36554e7c396f415536bf3a7d192 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 19 Oct 2020 17:59:52 +0300 Subject: [PATCH] fix pimathmatrix --- libs/main/math/pimathmatrix.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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; } /**