2nd fail fixed

This commit is contained in:
Simon 2025-11-08 15:05:29 +01:00
parent 5b5e1182bd
commit ebff958c4e

View File

@ -44,7 +44,12 @@ MatrixType getMatrixAt(const Matrix matrix, unsigned int rowIdx, unsigned int co
{
MatrixType value = 0;
return value = matrix.buffer[rowIdx * matrix.cols + colIdx]; // hole Wert value am Punkt (row col)
if (rowIdx < matrix.rows && colIdx < matrix.cols)
{
value = matrix.buffer[rowIdx * matrix.cols + colIdx]; // hole Wert value am Punkt (row col)
}
return value;
}
Matrix add(const Matrix matrix1, const Matrix matrix2)