Index: src/cube.h ================================================================== --- src/cube.h +++ src/cube.h @@ -285,14 +285,13 @@ #define PI (3.1415927f) #define PI2 (2 * PI) // simplistic vector ops -#define dotprod(u, v) ((u).x * (v).x + (u).y * (v).y + (u).z * (v).z) #define vdist(d, v, e, s) \ OFVector3D v = OFSubtractVectors3D(s, e); \ - float d = (float)sqrt(dotprod(v, v)); + float d = sqrtf(OFDotProductOfVectors3D(v, v)); #define vreject(v, u, max) \ ((v).x > (u).x + (max) || (v).x < (u).x - (max) || \ (v).y > (u).y + (max) || (v).y < (u).y - (max)) #define vlinterp(v, f, u, g) \ { \ Index: src/weapon.m ================================================================== --- src/weapon.m +++ src/weapon.m @@ -88,16 +88,16 @@ { OFVector3D v = *to, w = d.origin; const OFVector3D *p; v = OFSubtractVectors3D(v, *from); w = OFSubtractVectors3D(w, *from); - float c1 = dotprod(w, v); + float c1 = OFDotProductOfVectors3D(w, v); if (c1 <= 0) p = from; else { - float c2 = dotprod(v, v); + float c2 = OFDotProductOfVectors3D(v, v); if (c2 <= c1) p = to; else { v = OFMultiplyVector3D(v, c1 / c2); v = OFAddVectors3D(v, *from);