summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBensProgramma <[email protected]>2021-12-02 14:49:27 -0800
committerGitHub <[email protected]>2021-12-02 14:49:27 -0800
commitb8e3f1dba91a58e4b36af85450b866bc6251e21a (patch)
tree37ed4ed8a7b4e18736b2d0fbfab55ce2dd75a0d1
parentUpdate Project_3_Hernandez_Schroeder.cpp (diff)
downloadproject_3_hernandez_schroeder-b8e3f1dba91a58e4b36af85450b866bc6251e21a.tar.xz
project_3_hernandez_schroeder-b8e3f1dba91a58e4b36af85450b866bc6251e21a.zip
comment update
-rw-r--r--Project3_Hernandez_Schroeder/Project_3_Hernandez_Schroeder.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Project3_Hernandez_Schroeder/Project_3_Hernandez_Schroeder.cpp b/Project3_Hernandez_Schroeder/Project_3_Hernandez_Schroeder.cpp
index e5f567e..98429e1 100644
--- a/Project3_Hernandez_Schroeder/Project_3_Hernandez_Schroeder.cpp
+++ b/Project3_Hernandez_Schroeder/Project_3_Hernandez_Schroeder.cpp
@@ -229,12 +229,12 @@ void multiplyMatrices(float MatrixA[3][3], float MatrixB[3][3], float MatrixC[3]
*/
// Another way to do Matrix multiplication
- for (int i = 0; i < 3; ++i)//Loop from 0 to row order of the first matrix.
- for (int j = 0; j < 3; ++j)//Loop from 0 to the column order of the second matrix.
+ for (int i = 0; i < 3; ++i) //Loop from 0 to row order of the first matrix.
+ for (int j = 0; j < 3; ++j) //Loop from 0 to the column order of the second matrix.
- for (int k = 0; k < 3; ++k)//Loop from 0 to row order of the second matrix.
+ for (int k = 0; k < 3; ++k) //Loop from 0 to row order of the second matrix.
{
- MatrixC[i][j] += MatrixA[i][k] * MatrixB[k][j];//MatrixC[i][j]=(MatrixA[I][K] * matrixB[K][J])
+ MatrixC[i][j] += MatrixA[i][k] * MatrixB[k][j]; //MatrixC[i][j]=(whatever is currently in MatrixC[i][j])+(MatrixA[i][k] * matrixB[k][j])
}