[Bf-blender-cvs] [3a98426] master: Cleanup: remove redundant math calls

Campbell Barton noreply at git.blender.org
Fri Oct 23 22:12:51 CEST 2015


Commit: 3a98426ed6d37a204b1d55834e0590dcb7990b47
Author: Campbell Barton
Date:   Sat Oct 24 05:29:53 2015 +1100
Branches: master
https://developer.blender.org/rB3a98426ed6d37a204b1d55834e0590dcb7990b47

Cleanup: remove redundant math calls

===================================================================

M	source/blender/blenlib/intern/math_rotation.c

===================================================================

diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 0ef3f04..88c577f 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -1149,10 +1149,8 @@ void eul_to_mat4(float mat[4][4], const float eul[3])
 /* XYZ order */
 static void mat3_to_eul2(float tmat[3][3], float eul1[3], float eul2[3])
 {
-	float cy, quat[4], mat[3][3];
+	float cy, mat[3][3];
 
-	mat3_to_quat(quat, tmat);
-	quat_to_mat3(mat, quat);
 	normalize_m3_m3(mat, tmat);
 
 	cy = hypotf(mat[0][0], mat[0][1]);
@@ -1494,7 +1492,6 @@ void eulO_to_mat4(float M[4][4], const float e[3], const short order)
 	float m[3][3];
 
 	/* for now, we'll just do this the slow way (i.e. copying matrices) */
-	normalize_m3(m);
 	eulO_to_mat3(m, e, order);
 	copy_m4_m3(M, m);
 }




More information about the Bf-blender-cvs mailing list