From 9370d60837c716b37a160544372026fc8d2972ca Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Tue, 29 Nov 2016 22:07:55 +0200 Subject: [PATCH] util: print ivec3 helper --- include/cglm-io.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/cglm-io.h b/include/cglm-io.h index 12c1a13..e3dca02 100644 --- a/include/cglm-io.h +++ b/include/cglm-io.h @@ -117,6 +117,28 @@ glm_vec3_print(vec3 vec, #undef m } +CGLM_INLINE +void +glm_ivec3_print(ivec3 vec, + FILE * __restrict ostream) { + int i; + +#define m 3 + + fprintf(ostream, "Vector (int%d):\n\t|", m); + + for (i = 0; i < m; i++) { + fprintf(ostream, "%d", vec[i]); + + if (i != m - 1) + fprintf(ostream, "\t"); + } + + fprintf(ostream, "|\n\n"); + +#undef m +} + CGLM_INLINE void glm_versor_print(versor vec,