From 5f5b94a8eb3c954c2539d1907fe18686c9d880ca Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 1 May 2021 19:34:09 -0700 Subject: [PATCH] mark various v* functions in Smyrna as static These are not used outside of their containing file. --- cmd/smyrna/trackball.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/smyrna/trackball.c b/cmd/smyrna/trackball.c index bfba6e5e6..573ac477a 100644 --- a/cmd/smyrna/trackball.c +++ b/cmd/smyrna/trackball.c @@ -67,7 +67,7 @@ static float tb_project_to_sphere(float, float, float); static void normalize_quat(float[4]); -void vzero(float *v) +static void vzero(float *v) { v[0] = 0.0; v[1] = 0.0; @@ -81,21 +81,21 @@ void vset(float *v, float x, float y, float z) v[2] = z; } -void vsub(const float *src1, const float *src2, float *dst) +static void vsub(const float *src1, const float *src2, float *dst) { dst[0] = src1[0] - src2[0]; dst[1] = src1[1] - src2[1]; dst[2] = src1[2] - src2[2]; } -void vcopy(const float *v1, float *v2) +static void vcopy(const float *v1, float *v2) { int i; for (i = 0; i < 3; i++) v2[i] = v1[i]; } -void vcross(const float *v1, const float *v2, float *cross) +static void vcross(const float *v1, const float *v2, float *cross) { float temp[3]; @@ -105,29 +105,29 @@ void vcross(const float *v1, const float *v2, float *cross) vcopy(temp, cross); } -float vlength(const float *v) +static float vlength(const float *v) { return sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); } -void vscale(float *v, float div) +static void vscale(float *v, float div) { v[0] *= div; v[1] *= div; v[2] *= div; } -void vnormal(float *v) +static void vnormal(float *v) { vscale(v, 1.0 / vlength(v)); } -float vdot(const float *v1, const float *v2) +static float vdot(const float *v1, const float *v2) { return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2]; } -void vadd(const float *src1, const float *src2, float *dst) +static void vadd(const float *src1, const float *src2, float *dst) { dst[0] = src1[0] + src2[0]; dst[1] = src1[1] + src2[1]; -- 2.40.0