move mat3 print to util and insert mat3 to default header

This commit is contained in:
Recep Aslantas
2016-10-11 12:04:54 +03:00
parent 5344599ae4
commit 822923a035
3 changed files with 31 additions and 30 deletions

View File

@@ -42,6 +42,36 @@ glm_mat4_print(mat4 matrix,
#undef n
}
CGLM_INLINE
void
glm_mat3_print(mat3 matrix,
FILE * __restrict ostream) {
int i;
int j;
#define m 3
#define n 3
fprintf(ostream, "Matrix (float%dx%d):\n", m, n);
for (i = 0; i < m; i++) {
fprintf(ostream, "\t|");
for (j = 0; j < n; j++) {
fprintf(ostream, "%0.4f", matrix[j][i]);;
if (j != n - 1)
fprintf(ostream, "\t");
}
fprintf(ostream, "|\n");
}
fprintf(ostream, "\n");
#undef m
#undef n
}
CGLM_INLINE
void
glm_vec4_print(vec4 vec,