merge matrix.c

This commit is contained in:
fischerch103508 committed 2026-11-05 14:59:52 +01:00
1 parent e15c89bb1d
commit cfe95a6221
1 file changed
-14
-14
View File
@@ -6,19 +6,6 @@
Matrix createMatrix(unsigned int rows, unsigned int cols)
{
<<<<<<< HEAD
struct Matrix m;
m.buffer = calloc(rows*cols, sizeof(MatrixType));
m.rows = rows;
m.cols = cols;
if( rows <= 0 || cols <= 0)
{
m.rows = 0;
m.cols = 0;
}
return m;
=======
Matrix m;
if (rows == 0 || cols == 0) //Ueberprüfen, ob ungültige Werte für Matrix vorhanden
@@ -34,7 +21,6 @@ Matrix createMatrix(unsigned int rows, unsigned int cols)
m.buffer = (MatrixType*)calloc(rows*cols, sizeof(MatrixType)); //Bei Fehlschalg gibt calloc entweder NULL oder Zeiger verschieden von NULL aus
return m;
>>>>>>> b8adf7f0d66d424098983e650064e8c25353316f
}
void clearMatrix(Matrix *matrix)