summaryrefslogtreecommitdiff
path: root/thirdparty/bullet/LinearMath/btMatrixX.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/bullet/LinearMath/btMatrixX.h')
-rw-r--r--thirdparty/bullet/LinearMath/btMatrixX.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/thirdparty/bullet/LinearMath/btMatrixX.h b/thirdparty/bullet/LinearMath/btMatrixX.h
index 388c57c2d7..961c94dc63 100644
--- a/thirdparty/bullet/LinearMath/btMatrixX.h
+++ b/thirdparty/bullet/LinearMath/btMatrixX.h
@@ -338,24 +338,23 @@ struct btMatrixX
btMatrixX res(rows(), other.cols());
res.setZero();
// BT_PROFILE("btMatrixX mul");
- for (int j = 0; j < res.cols(); ++j)
+ for (int i = 0; i < rows(); ++i)
{
{
- for (int i = 0; i < res.rows(); ++i)
+ for (int j = 0; j < other.cols(); ++j)
{
T dotProd = 0;
- // T dotProd2=0;
- //int waste=0,waste2=0;
-
{
- // bool useOtherCol = true;
{
- for (int v = 0; v < rows(); v++)
+ int r = rows();
+ int c = cols();
+
+ for (int k = 0; k < cols(); k++)
{
- T w = (*this)(i, v);
- if (other(v, j) != 0.f)
+ T w = (*this)(i, k);
+ if (other(k, j) != 0.f)
{
- dotProd += w * other(v, j);
+ dotProd += w * other(k, j);
}
}
}