diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-11 00:40:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-11 00:40:16 +0300 |
commit | 16c621e5295767ccfc19f801802a7f480eb0c3b2 (patch) | |
tree | 80ed325b2556e01f418a6f44a65479d2e2211c0f /source/blender/blenlib/intern/math_vector.c | |
parent | 1a52b5f7d3cc46d98141c32cc7507bbf29f83ebb (diff) | |
parent | 4719836eca2e661ac79fbd1448fdc876b62af458 (diff) |
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source/blender/blenlib/intern/math_vector.c')
-rw-r--r-- | source/blender/blenlib/intern/math_vector.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 000468b3715..a21e0c8f092 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -280,6 +280,12 @@ void mid_v2_v2v2(float r[2], const float a[2], const float b[2]) r[1] = 0.5f * (a[1] + b[1]); } +void mid_v2_v2v2v2(float v[2], const float v1[2], const float v2[2], const float v3[2]) +{ + v[0] = (v1[0] + v2[0] + v3[0]) / 3.0f; + v[1] = (v1[1] + v2[1] + v3[1]) / 3.0f; +} + void mid_v3_v3v3v3(float v[3], const float v1[3], const float v2[3], const float v3[3]) { v[0] = (v1[0] + v2[0] + v3[0]) / 3.0f; |