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>2011-01-23 11:37:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-23 11:37:34 +0300
commit552b36733bb2015aa64933bf3c57f1ad90c87b5a (patch)
tree36e68c34de612538b154d9b711aee6e1593ef124 /source/blender/blenlib/intern
parenta877155a7c2359b1984641ff9225f259de48611c (diff)
bugfix + minor mathutils.Vector edits.
- multiplying a 2D vector by a 3x3 or 4x4 matrix would use un-initialized memory, now throw an exception. - use more variable length array BLI_math functions.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/math_vector.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index 539d3fb97f6..37a68cb0fca 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -407,6 +407,14 @@ void add_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_
while(i--) { *(tar--) = *(src_a--) + *(src_b--); }
}
+void sub_vn_vn(float *array_tar, const float *array_src, const int size)
+{
+ float *tar= array_tar + (size-1);
+ const float *src= array_src + (size-1);
+ int i= size;
+ while(i--) { *(tar--) -= *(src--); }
+}
+
void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const int size)
{
float *tar= array_tar + (size-1);