Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-11 19:32:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-11 19:32:26 +0400
commite6b22d287f4742e4ccd6dd6a171370252ed5b5aa (patch)
tree182fb3fa4cba9cb42055003aee8a46a324df9ce5 /source/blender/blenlib/intern/math_vector.c
parentc098557240ec0b94e510e87ab6116356a1e90904 (diff)
utility function for printing arbitrary sizes vectors.
Diffstat (limited to 'source/blender/blenlib/intern/math_vector.c')
-rw-r--r--source/blender/blenlib/intern/math_vector.c10
1 files changed, 10 insertions, 0 deletions
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];