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-06-13 00:04:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-13 00:04:55 +0400
commite1241030db424ce10e9fee04076ff7e209eac98c (patch)
treeac8e1a81a81fa130e166366c6b93587e77e4188f /source/blender/blenlib/intern/math_vector_inline.c
parent7fec7070d7fcf7bde53768e555b40b57ef4a7552 (diff)
yse BLI_math for the compositor in more places.
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 56188048c02..e89b2ece467 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -272,6 +272,22 @@ MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
r[2] = a[2] + b[2];
}
+MINLINE void add_v4_v4(float r[4], const float a[4])
+{
+ r[0] += a[0];
+ r[1] += a[1];
+ r[2] += a[2];
+ r[3] += a[3];
+}
+
+MINLINE void add_v4_v4v4(float r[4], const float a[4], const float b[4])
+{
+ r[0] = a[0] + b[0];
+ r[1] = a[1] + b[1];
+ r[2] = a[2] + b[2];
+ r[3] = a[3] + b[3];
+}
+
MINLINE void sub_v2_v2(float r[2], const float a[2])
{
r[0] -= a[0];
@@ -361,6 +377,14 @@ MINLINE void mul_v4_fl(float r[4], float f)
r[3] *= f;
}
+MINLINE void mul_v4_v4fl(float r[4], const float a[4], float f)
+{
+ r[0] = a[0] * f;
+ r[1] = a[1] * f;
+ r[2] = a[2] * f;
+ r[3] = a[3] * f;
+}
+
MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f)
{
r[0] += a[0] * f;
@@ -409,6 +433,14 @@ MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f)
r[3] += a[3] * f;
}
+MINLINE void madd_v4_v4v4(float r[4], const float a[4], const float b[4])
+{
+ r[0] += a[0] * b[0];
+ r[1] += a[1] * b[1];
+ r[2] += a[2] * b[2];
+ r[3] += a[3] * b[3];
+}
+
MINLINE void mul_v3_v3v3(float r[3], const float v1[3], const float v2[3])
{
r[0] = v1[0] * v2[0];