[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54401] trunk/blender/source/blender/ blenlib: code cleanup: use const for matrix functions vector args.
Campbell Barton
ideasman42 at gmail.com
Sat Feb 9 08:14:43 CET 2013
Revision: 54401
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54401
Author: campbellbarton
Date: 2013-02-09 07:14:42 +0000 (Sat, 09 Feb 2013)
Log Message:
-----------
code cleanup: use const for matrix functions vector args.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/BLI_math_matrix.h
trunk/blender/source/blender/blenlib/intern/math_matrix.c
Modified: trunk/blender/source/blender/blenlib/BLI_math_matrix.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_matrix.h 2013-02-09 06:32:17 UTC (rev 54400)
+++ trunk/blender/source/blender/blenlib/BLI_math_matrix.h 2013-02-09 07:14:42 UTC (rev 54401)
@@ -90,12 +90,12 @@
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]);
+void mul_v4_m4v4(float r[4], float M[4][4], const float v[4]);
void mul_project_m4_v3(float M[4][4], float vec[3]);
void mul_m3_v3(float M[3][3], float r[3]);
-void mul_v3_m3v3(float r[3], float M[3][3], float a[3]);
-void mul_v2_m3v3(float r[2], float M[3][3], float a[3]);
+void mul_v3_m3v3(float r[3], float M[3][3], const float a[3]);
+void mul_v2_m3v3(float r[2], float M[3][3], const float a[3]);
void mul_transposed_m3_v3(float M[3][3], float r[3]);
void mul_m3_v3_double(float M[3][3], double r[3]);
Modified: trunk/blender/source/blender/blenlib/intern/math_matrix.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_matrix.c 2013-02-09 06:32:17 UTC (rev 54400)
+++ trunk/blender/source/blender/blenlib/intern/math_matrix.c 2013-02-09 07:14:42 UTC (rev 54401)
@@ -366,7 +366,7 @@
vec[2] /= w;
}
-void mul_v4_m4v4(float r[4], float mat[4][4], float v[4])
+void mul_v4_m4v4(float r[4], float mat[4][4], const float v[4])
{
float x, y, z;
@@ -404,14 +404,14 @@
mul_v4d_m4v4d(r, mat, r);
}
-void mul_v3_m3v3(float r[3], float M[3][3], float a[3])
+void mul_v3_m3v3(float r[3], float M[3][3], const float a[3])
{
r[0] = M[0][0] * a[0] + M[1][0] * a[1] + M[2][0] * a[2];
r[1] = M[0][1] * a[0] + M[1][1] * a[1] + M[2][1] * a[2];
r[2] = M[0][2] * a[0] + M[1][2] * a[1] + M[2][2] * a[2];
}
-void mul_v2_m3v3(float r[2], float M[3][3], float a[3])
+void mul_v2_m3v3(float r[2], float M[3][3], const float a[3])
{
r[0] = M[0][0] * a[0] + M[1][0] * a[1] + M[2][0] * a[2];
r[1] = M[0][1] * a[0] + M[1][1] * a[1] + M[2][1] * a[2];
More information about the Bf-blender-cvs
mailing list