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>2013-10-20 16:08:51 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-10-20 16:08:51 +0400
commite9d5e9813c5cce45f14bb25bb82f2e88f5688351 (patch)
treeba63074682d55b5ca2b1109cca58891f6d226e34 /source/blender/blenlib/intern/math_matrix.c
parent30a2d7fe8572791947f5fe3b94b9735bfab83166 (diff)
Code cleanup: added generic function copt_m3_m3d
Diffstat (limited to 'source/blender/blenlib/intern/math_matrix.c')
-rw-r--r--source/blender/blenlib/intern/math_matrix.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 6b96f0515b9..2cda4425d8e 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -112,6 +112,22 @@ void copy_m4_m3(float m1[4][4], float m2[3][3]) /* no clear */
}
+void copt_m3_m3d(float R[3][3], double A[3][3])
+{
+ /* Keep it stupid simple for better data flow in CPU. */
+ R[0][0] = A[0][0];
+ R[0][1] = A[0][1];
+ R[0][2] = A[0][2];
+
+ R[1][0] = A[1][0];
+ R[1][1] = A[1][1];
+ R[1][2] = A[1][2];
+
+ R[2][0] = A[2][0];
+ R[2][1] = A[2][1];
+ R[2][2] = A[2][2];
+}
+
void swap_m3m3(float m1[3][3], float m2[3][3])
{
float t;