mat2: implement some mat2 func

* also implement as SSE
This commit is contained in:
Recep Aslantas
2019-06-19 23:35:38 +03:00
parent 047ed259ae
commit ad823d9681
5 changed files with 241 additions and 0 deletions

View File

@@ -83,6 +83,36 @@ glm_mat3_print(mat3 matrix,
#undef n
}
CGLM_INLINE
void
glm_mat2_print(mat2 matrix,
FILE * __restrict ostream) {
int i;
int j;
#define m 2
#define n 2
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,