summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--3dmath.c4
-rw-r--r--3dmath.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/3dmath.c b/3dmath.c
index ece6f83..d5806b6 100644
--- a/3dmath.c
+++ b/3dmath.c
@@ -5,7 +5,7 @@
#define POW2(x) ((x) * (x))
float
-dot(float x[3], float y[3]) {
+dot(const float x[3], const float y[3]) {
return x[0] * y[0] + x[1] * y[1] + x[2] * y[2];
}
@@ -21,7 +21,7 @@ normalize(float x[3]) {
}
float
-sphere_intersect(float y[3], float r[3], float s[3], float d[3], float c[3], float R) {
+sphere_intersect(float y[3], float r[3], const float s[3], const float d[3], const float c[3], float R) {
int i;
float D, n[3], t, v[3];
diff --git a/3dmath.h b/3dmath.h
index 4135f3b..0b6e035 100644
--- a/3dmath.h
+++ b/3dmath.h
@@ -1,3 +1,3 @@
-float dot(float x[3], float y[3]);
+float dot(const float x[3], const float y[3]);
void normalize(float x[3]);
-float sphere_intersect(float y[3], float r[3], float s[3], float d[3], float c[3], float R);
+float sphere_intersect(float y[3], float r[3], const float s[3], const float d[3], const float c[3], float R);