From 079823dcab9444e252e853f8edfed881174d437e Mon Sep 17 00:00:00 2001 From: Soikk Date: Sun, 28 Aug 2022 19:40:32 +0200 Subject: Upgraded from double to long double --- matrix.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'matrix.h') diff --git a/matrix.h b/matrix.h index 6c4e910..cc52038 100644 --- a/matrix.h +++ b/matrix.h @@ -2,6 +2,8 @@ #ifndef MATRIX_H #define MATRIX_H +#define __MINGW_FEATURES__ 1 + #include #include #include @@ -10,7 +12,7 @@ typedef struct matrix{ int rows; int cols; - double **data; + long double **data; } matrix; matrix *newMatrix(int rows, int cols); @@ -21,13 +23,13 @@ matrix *copyMatrix(matrix *m); matrix *identityMatrix(int order); -matrix *fillMatrix(matrix *m, double n); +matrix *fillMatrix(matrix *m, long double n); -matrix *addMatrix(matrix *m, double n); +matrix *addMatrix(matrix *m, long double n); -matrix *subtractMatrix(matrix *m, double n); +matrix *subtractMatrix(matrix *m, long double n); -matrix *scaleMatrix(matrix *m, double n); +matrix *multiplyMatrix(matrix *m, long double n); matrix *addMatrices(matrix *m1, matrix *m2); @@ -37,7 +39,7 @@ matrix *multiplyMatrices(matrix *m1, matrix *m2); matrix *subMatrix(matrix *m, int row, int col); -double determinant(matrix *m); +long double determinant(matrix *m); matrix *cofactor(matrix *m); -- cgit v1.2.3