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:
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 16f35dbc5fa..8b09cb86d3a 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -194,24 +194,24 @@ MINLINE void negate_v3(float r[3])
r[2]= -r[2];
}
-MINLINE void negate_v3_v3(float r[3], float a[3])
+MINLINE void negate_v3_v3(float r[3], const float a[3])
{
r[0]= -a[0];
r[1]= -a[1];
r[2]= -a[2];
}
-MINLINE float dot_v2v2(float *a, float *b)
+MINLINE float dot_v2v2(const float a[2], const float b[2])
{
return a[0]*b[0] + a[1]*b[1];
}
-MINLINE float dot_v3v3(float a[3], float b[3])
+MINLINE float dot_v3v3(const float a[3], const float b[3])
{
return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
}
-MINLINE float cross_v2v2(float a[2], float b[2])
+MINLINE float cross_v2v2(const float a[2], const float b[2])
{
return a[0]*b[1] - a[1]*b[0];
}
@@ -236,12 +236,12 @@ MINLINE void star_m3_v3(float mat[][3], float *vec)
/*********************************** Length **********************************/
-MINLINE float len_v2(float *v)
+MINLINE float len_v2(const float v[2])
{
return (float)sqrt(v[0]*v[0] + v[1]*v[1]);
}
-MINLINE float len_v2v2(float *v1, float *v2)
+MINLINE float len_v2v2(const float v1[2], const float v2[2])
{
float x, y;
@@ -250,12 +250,12 @@ MINLINE float len_v2v2(float *v1, float *v2)
return (float)sqrt(x*x+y*y);
}
-MINLINE float len_v3(float a[3])
+MINLINE float len_v3(const float a[3])
{
return sqrtf(dot_v3v3(a, a));
}
-MINLINE float len_v3v3(float a[3], float b[3])
+MINLINE float len_v3v3(const float a[3], const float b[3])
{
float d[3];