Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d8e759b436 | |||
| 28944bd871 | |||
| 29b2966c63 | |||
| 41c164d3b2 | |||
| b4bc2fae8a |
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"makefile.configureOnOpen": false
|
||||||
|
}
|
||||||
5
matrix.c
5
matrix.c
@ -6,12 +6,13 @@
|
|||||||
|
|
||||||
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
||||||
{
|
{
|
||||||
|
MatrixType* data = malloc(rows * cols * sizeof(MatrixType));
|
||||||
|
Matrix newMatrix = {rows, cols, data};
|
||||||
|
return newMatrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearMatrix(Matrix *matrix)
|
void clearMatrix(Matrix *matrix)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned int colIdx)
|
void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned int colIdx)
|
||||||
|
|||||||
6
matrix.h
6
matrix.h
@ -6,6 +6,12 @@
|
|||||||
typedef float MatrixType;
|
typedef float MatrixType;
|
||||||
|
|
||||||
// TODO Matrixtyp definieren
|
// TODO Matrixtyp definieren
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned int rows;
|
||||||
|
unsigned int cols;
|
||||||
|
MatrixType *data;
|
||||||
|
} Matrix;
|
||||||
|
|
||||||
|
|
||||||
Matrix createMatrix(unsigned int rows, unsigned int cols);
|
Matrix createMatrix(unsigned int rows, unsigned int cols);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user