diff --git a/public/matrixlib.c b/public/matrixlib.c index 2926ce91..8e09abc5 100644 --- a/public/matrixlib.c +++ b/public/matrixlib.c @@ -210,9 +210,9 @@ void Matrix3x4_TransformAABB( const matrix3x4 world, const vec3_t mins, const ve VectorSubtract( maxs, localCenter, localExtents ); Matrix3x4_VectorTransform( world, localCenter, worldCenter ); - worldExtents[0] = DotProductAbs( localExtents, world[0] ); // auto-transposed! - worldExtents[1] = DotProductAbs( localExtents, world[1] ); - worldExtents[2] = DotProductAbs( localExtents, world[2] ); + worldExtents[0] = DotProductFabs( localExtents, world[0] ); // auto-transposed! + worldExtents[1] = DotProductFabs( localExtents, world[1] ); + worldExtents[2] = DotProductFabs( localExtents, world[2] ); VectorSubtract( worldCenter, worldExtents, absmin ); VectorAdd( worldCenter, worldExtents, absmax ); diff --git a/public/xash3d_mathlib.h b/public/xash3d_mathlib.h index afe02d9e..53013890 100644 --- a/public/xash3d_mathlib.h +++ b/public/xash3d_mathlib.h @@ -85,7 +85,6 @@ CONSTANTS AND HELPER MACROS #define VectorIsNAN(v) (IS_NAN(v[0]) || IS_NAN(v[1]) || IS_NAN(v[2])) #define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2]) -#define DotProductAbs(x,y) (abs((x)[0]*(y)[0])+abs((x)[1]*(y)[1])+abs((x)[2]*(y)[2])) #define DotProductFabs(x,y) (fabs((x)[0]*(y)[0])+fabs((x)[1]*(y)[1])+fabs((x)[2]*(y)[2])) #define DotProductPrecise(x,y) ((double)(x)[0]*(double)(y)[0]+(double)(x)[1]*(double)(y)[1]+(double)(x)[2]*(double)(y)[2]) #define CrossProduct(a,b,c) ((c)[0]=(a)[1]*(b)[2]-(a)[2]*(b)[1],(c)[1]=(a)[2]*(b)[0]-(a)[0]*(b)[2],(c)[2]=(a)[0]*(b)[1]-(a)[1]*(b)[0])