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>2012-05-31 15:57:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-31 15:57:09 +0400
commitceea98be2f54ed72691a130ea8eed613726e4521 (patch)
tree6af6f1353ecad62c68d586529ba144ac488bc33f /source/blender/blenlib/intern/math_vector.c
parent31a94e400397c528f230d2c578176175b2f731f7 (diff)
math lib changes from tomato
Diffstat (limited to 'source/blender/blenlib/intern/math_vector.c')
-rw-r--r--source/blender/blenlib/intern/math_vector.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index 90e6a4cb945..d939576904e 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -550,6 +550,27 @@ void add_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_
}
}
+void madd_vn_vn(float *array_tar, const float *array_src, const float f, const int size)
+{
+ float *tar = array_tar + (size - 1);
+ const float *src = array_src + (size - 1);
+ int i = size;
+ while (i--) {
+ *(tar--) += *(src--) * f;
+ }
+}
+
+void madd_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const float f, const int size)
+{
+ float *tar = array_tar + (size - 1);
+ const float *src_a = array_src_a + (size - 1);
+ const float *src_b = array_src_b + (size - 1);
+ int i = size;
+ while (i--) {
+ *(tar--) = *(src_a--) + (*(src_b--) * f);
+ }
+}
+
void sub_vn_vn(float *array_tar, const float *array_src, const int size)
{
float *tar = array_tar + (size - 1);
@@ -571,6 +592,27 @@ void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_
}
}
+void msub_vn_vn(float *array_tar, const float *array_src, const float f, const int size)
+{
+ float *tar = array_tar + (size - 1);
+ const float *src = array_src + (size - 1);
+ int i = size;
+ while (i--) {
+ *(tar--) -= *(src--) * f;
+ }
+}
+
+void msub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const float f, const int size)
+{
+ float *tar = array_tar + (size - 1);
+ const float *src_a = array_src_a + (size - 1);
+ const float *src_b = array_src_b + (size - 1);
+ int i = size;
+ while (i--) {
+ *(tar--) = *(src_a--) - (*(src_b--) * f);
+ }
+}
+
void fill_vn_i(int *array_tar, const int size, const int val)
{
int *tar = array_tar + (size - 1);