From e6b22d287f4742e4ccd6dd6a171370252ed5b5aa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 11 Jul 2013 15:32:26 +0000 Subject: utility function for printing arbitrary sizes vectors. --- source/blender/blenlib/intern/math_vector.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/blenlib/intern/math_vector.c') diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 78266c47170..8c653b7057a 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -542,6 +542,16 @@ void print_v4(const char *str, const float v[4]) printf("%s: %.3f %.3f %.3f %.3f\n", str, v[0], v[1], v[2], v[3]); } +void print_vn(const char *str, const float v[], const int n) +{ + int i = 0; + printf("%s[%d]:", str, n); + while (i++ < n) { + printf(" %.3f", v[i]); + } + printf("\n"); +} + void minmax_v3v3_v3(float min[3], float max[3], const float vec[3]) { if (min[0] > vec[0]) min[0] = vec[0]; -- cgit v1.2.3