From 8f863ec625661007a3c2f35b98f2e32c7ca9890f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 23 Jan 2013 14:37:12 +0000 Subject: Fix normalize_m4_m4 not working correct by not copying the entire matrix, caused issue in blender internal with recent fix. --- source/blender/blenlib/intern/math_matrix.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source/blender/blenlib/intern/math_matrix.c') diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 03f8d63024e..8f9ea917b8c 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -980,14 +980,8 @@ void normalize_m4(float mat[4][4]) void normalize_m4_m4(float rmat[4][4], float mat[4][4]) { - float len; - - len = normalize_v3_v3(rmat[0], mat[0]); - if (len != 0.0f) rmat[0][3] = mat[0][3] / len; - len = normalize_v3_v3(rmat[1], mat[1]); - if (len != 0.0f) rmat[1][3] = mat[1][3] / len; - len = normalize_v3_v3(rmat[2], mat[2]); - if (len != 0.0f) rmat[2][3] = mat[2][3] / len; + copy_m4_m4(rmat, mat); + normalize_m4(rmat); } void adjoint_m2_m2(float m1[2][2], float m[2][2]) -- cgit v1.2.3