From e16ba13251701a9845adf702e60be3f2fad724bd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 12 Sep 2011 13:00:24 +0000 Subject: use vector size and const args where possible (no functional change) --- source/blender/blenlib/BLI_math_matrix.h | 2 +- source/blender/blenlib/intern/math_matrix.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index 18955c158c6..d6a8f0fb925 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -83,7 +83,7 @@ void mul_serie_m4(float R[4][4], float M5[4][4], float M6[4][4], float M7[4][4], float M8[4][4]); void mul_m4_v3(float M[4][4], float r[3]); -void mul_v3_m4v3(float r[3], float M[4][4], float v[3]); +void mul_v3_m4v3(float r[3], float M[4][4], const float v[3]); void mul_mat3_m4_v3(float M[4][4], float r[3]); void mul_m4_v4(float M[4][4], float r[4]); void mul_v4_m4v4(float r[4], float M[4][4], float v[4]); diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index e2f594376cb..20c503de2c3 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -306,7 +306,7 @@ void mul_serie_m4(float answ[][4], float m1[][4], } } -void mul_m4_v3(float mat[][4], float *vec) +void mul_m4_v3(float mat[][4], float vec[3]) { float x,y; @@ -317,7 +317,7 @@ void mul_m4_v3(float mat[][4], float *vec) vec[2]=x*mat[0][2] + y*mat[1][2] + mat[2][2]*vec[2] + mat[3][2]; } -void mul_v3_m4v3(float *in, float mat[][4], float *vec) +void mul_v3_m4v3(float in[3], float mat[][4], const float vec[3]) { float x,y; @@ -329,7 +329,7 @@ void mul_v3_m4v3(float *in, float mat[][4], float *vec) } /* same as mul_m4_v3() but doesnt apply translation component */ -void mul_mat3_m4_v3(float mat[][4], float *vec) +void mul_mat3_m4_v3(float mat[][4], float vec[3]) { float x,y; @@ -384,7 +384,7 @@ void mul_m3_v3(float M[3][3], float r[3]) copy_v3_v3(r, tmp); } -void mul_transposed_m3_v3(float mat[][3], float *vec) +void mul_transposed_m3_v3(float mat[][3], float vec[3]) { float x,y; @@ -422,7 +422,7 @@ void mul_mat3_m4_fl(float m[4][4], float f) m[i][j] *= f; } -void mul_m3_v3_double(float mat[][3], double *vec) +void mul_m3_v3_double(float mat[][3], double vec[3]) { double x,y; @@ -979,14 +979,14 @@ void size_to_mat4(float mat[][4], const float size[3]) copy_m4_m3(mat, tmat); } -void mat3_to_size(float *size, float mat[][3]) +void mat3_to_size(float size[3], float mat[][3]) { size[0]= len_v3(mat[0]); size[1]= len_v3(mat[1]); size[2]= len_v3(mat[2]); } -void mat4_to_size(float *size, float mat[][4]) +void mat4_to_size(float size[3], float mat[][4]) { size[0]= len_v3(mat[0]); size[1]= len_v3(mat[1]); -- cgit v1.2.3