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>2015-03-09 12:20:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-09 12:26:09 +0300
commit9ffc66b1c0e33b107193af38c71efb86c714dc5b (patch)
treeef7f285e1933006723bcf44aad382756551837ae /source/blender/blenlib/intern/math_vector.c
parentd4c1e98dd4bc0b5a9a01d8ffffe747fe5b9ee73b (diff)
Math Lib: add mid_v3_v3v3v3v3
Diffstat (limited to 'source/blender/blenlib/intern/math_vector.c')
-rw-r--r--source/blender/blenlib/intern/math_vector.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index 1658c4ffc39..814180bba24 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -252,6 +252,13 @@ void mid_v3_v3v3v3(float v[3], const float v1[3], const float v2[3], const float
v[2] = (v1[2] + v2[2] + v3[2]) / 3.0f;
}
+void mid_v3_v3v3v3v3(float v[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3])
+{
+ v[0] = (v1[0] + v2[0] + v3[0] + v4[0]) / 4.0f;
+ v[1] = (v1[1] + v2[1] + v3[1] + v4[1]) / 4.0f;
+ v[2] = (v1[2] + v2[2] + v3[2] + v4[2]) / 4.0f;
+}
+
/**
* Specialized function for calculating normals.
* fastpath for: