summaryrefslogtreecommitdiff
path: root/3dmath.h
diff options
context:
space:
mode:
authorMartin StensgÄrd <mastensg@users.noreply.github.com>2016-11-02 02:22:42 +0100
committerGitHub <noreply@github.com>2016-11-02 02:22:42 +0100
commit73da8a3ac056cb1c442fc3a24b0148037b180392 (patch)
tree45ffc7233b8bc234d876cab68b20b0664de35694 /3dmath.h
parent706da965d3c7892ef09b83bdf6120f104faa2ede (diff)
parentc1a4ed37fe2a1e069a9b827d0012cab38984ee8f (diff)
Merge pull request #1 from mortehu/master
Make a headless entry point for benchmarking purposes
Diffstat (limited to '3dmath.h')
-rw-r--r--3dmath.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/3dmath.h b/3dmath.h
index 4135f3b..1635c40 100644
--- a/3dmath.h
+++ b/3dmath.h
@@ -1,3 +1,8 @@
-float dot(float x[3], float y[3]);
+#define POW2(x) ((x) * (x))
+
+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* restrict y, float* restrict r,
+ const float* restrict s, const float* restrict d,
+ const float* restrict c, float R, int invert);