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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-01-17 17:41:27 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-01-18 14:29:53 +0300
commitcb5302f962185b827e8c8b40f7a10dceebe310f9 (patch)
treebc9d4428e37bb9711f29e2a499d7a44bd8b7871f /source/blender/blenlib/BLI_math_vector.h
parent91697b0fa0bbe494cbaf8cc501a90a435d24d41d (diff)
Math: Make it possible to use vector for both input and output
Avoids nasty code all over where such math is required, and compilers can easily deal with such situation. Don't prefer questionable micro-optimization which comes with a cost of nasty actual logic code.
Diffstat (limited to 'source/blender/blenlib/BLI_math_vector.h')
-rw-r--r--source/blender/blenlib/BLI_math_vector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index a663d08b074..dc108a7c3ec 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -78,6 +78,11 @@ MINLINE void zero_v3_int(int r[3]);
MINLINE void copy_v2_v2_int(int r[2], const int a[2]);
MINLINE void copy_v3_v3_int(int r[3], const int a[3]);
MINLINE void copy_v4_v4_int(int r[4], const int a[4]);
+/* double */
+MINLINE void zero_v3_db(double r[3]);
+MINLINE void copy_v2_v2_db(double r[2], const double a[2]);
+MINLINE void copy_v3_v3_db(double r[3], const double a[3]);
+MINLINE void copy_v4_v4_db(double r[4], const double a[4]);
/* int <-> float */
MINLINE void copy_v2fl_v2i(float r[2], const int a[2]);
MINLINE void round_v2i_v2fl(int r[2], const float a[2]);