ref: 229a1dc2e021af252c97cd42db70fb5b414b9246
parent: d2788d62c1dffff408bcefdd500ff55cc38053ef
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Fri Jan 5 17:56:36 EST 2024
DotProduct: use the macro on Unix
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,6 @@
i_wad.o\
in_sdl.o\
keys.o\
- m_dotproduct.o\
mathlib.o\
menu.o\
model.o\
--- a/mathlib.h
+++ b/mathlib.h
@@ -28,8 +28,6 @@
void VectorMA (vec3_t veca, float scale, vec3_t vecb, vec3_t vecc);
-vec_t DotProduct (const vec3_t v1, const vec3_t v2);
-
vec_t Length (vec3_t v);
void CrossProduct (vec3_t v1, vec3_t v2, vec3_t cross);
float VectorNormalize (vec3_t v); // returns vector length
--- a/plan9/platform.h
+++ b/plan9/platform.h
@@ -45,3 +45,5 @@
#define exp2f(x) (exp((x) * (ln2c ? ln2c : (ln2c = log(2.0)))))
int qctz(unsigned);
+
+float DotProduct(const float v1[3], const float v2[3]);
--- a/unix/platform.h
+++ b/unix/platform.h
@@ -61,3 +61,5 @@
char *seprint(char *, char *, char *, ...);
int nrand(int);
+
+#define DotProduct(x,y) DotProduct_((x),(y))