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:
authorMiika Hamalainen <blender@miikah.org>2011-11-07 20:36:49 +0400
committerMiika Hamalainen <blender@miikah.org>2011-11-07 20:36:49 +0400
commitedec46b0a6aac18f406991b9e16228d4bd848c61 (patch)
tree1240768d737c63705fdb38c9832d926ed0bcda94 /source/blender/blenlib/intern/math_vector_inline.c
parent2ed6f077b3952123d56916980d18a379ecb3e5ac (diff)
parent4d7a9e5c055fd3903162b61fdd40fb77b2b96793 (diff)
Merge with trunk r41625
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index c460b69679b..1c7d131c750 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -78,6 +78,28 @@ MINLINE void copy_v4_v4(float r[4], const float a[4])
}
/* short */
+MINLINE void copy_v2_v2_char(char r[2], const char a[2])
+{
+ r[0]= a[0];
+ r[1]= a[1];
+}
+
+MINLINE void copy_v3_v3_char(char r[3], const char a[3])
+{
+ r[0]= a[0];
+ r[1]= a[1];
+ r[2]= a[2];
+}
+
+MINLINE void copy_v4_v4_char(char r[4], const char a[4])
+{
+ r[0]= a[0];
+ r[1]= a[1];
+ r[2]= a[2];
+ r[3]= a[3];
+}
+
+/* short */
MINLINE void copy_v2_v2_short(short r[2], const short a[2])
{
r[0]= a[0];
@@ -99,6 +121,28 @@ MINLINE void copy_v4_v4_short(short r[4], const short a[4])
r[3]= a[3];
}
+/* int */
+MINLINE void copy_v2_v2_int(int r[2], const int a[2])
+{
+ r[0]= a[0];
+ r[1]= a[1];
+}
+
+MINLINE void copy_v3_v3_int(int r[3], const int a[3])
+{
+ r[0]= a[0];
+ r[1]= a[1];
+ r[2]= a[2];
+}
+
+MINLINE void copy_v4_v4_int(int r[4], const int a[4])
+{
+ r[0]= a[0];
+ r[1]= a[1];
+ r[2]= a[2];
+ r[3]= a[3];
+}
+
MINLINE void swap_v2_v2(float a[2], float b[2])
{
SWAP(float, a[0], b[0]);