]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake2/common/mathlib.h
tools: reduce diff noise
[xonotic/netradiant.git] / tools / quake2 / common / mathlib.h
index f6d13483b03344998d0d62dd6350c1843934cff8..1999b71fdd94d2c5c665d8726ac79ddfb0c91f54 100644 (file)
@@ -1,75 +1,75 @@
-/*\r
-Copyright (C) 1999-2007 id Software, Inc. and contributors.\r
-For a list of contributors, see the accompanying CONTRIBUTORS file.\r
-\r
-This file is part of GtkRadiant.\r
-\r
-GtkRadiant is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2 of the License, or\r
-(at your option) any later version.\r
-\r
-GtkRadiant is distributed in the hope that it will be useful,\r
-but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GtkRadiant; if not, write to the Free Software\r
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
-*/\r
-#ifndef __MATHLIB__\r
-#define __MATHLIB__\r
-\r
-// mathlib.h\r
-\r
-#include <math.h>\r
-\r
-#ifdef DOUBLEVEC_T\r
-typedef double vec_t;\r
-#else\r
-typedef float vec_t;\r
-#endif\r
-typedef vec_t vec3_t[3];\r
-\r
-#define        SIDE_FRONT              0\r
-#define        SIDE_ON                 2\r
-#define        SIDE_BACK               1\r
-#define        SIDE_CROSS              -2\r
-\r
-#define        Q_PI    3.14159265358979323846\r
-\r
-extern vec3_t vec3_origin;\r
-\r
-#define        EQUAL_EPSILON   0.001\r
-\r
-qboolean VectorCompare (vec3_t v1, vec3_t v2);\r
-\r
-#define DotProduct(x,y) (x[0]*y[0]+x[1]*y[1]+x[2]*y[2])\r
-#define VectorSubtract(a,b,c) {c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];}\r
-#define VectorAdd(a,b,c) {c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];}\r
-#define VectorCopy(a,b) {b[0]=a[0];b[1]=a[1];b[2]=a[2];}\r
-#define VectorScale(a,b,c) {c[0]=b*a[0];c[1]=b*a[1];c[2]=b*a[2];}\r
-#define VectorClear(x) {x[0] = x[1] = x[2] = 0;}\r
-#define        VectorNegate(x) {x[0]=-x[0];x[1]=-x[1];x[2]=-x[2];}\r
-\r
-vec_t Q_rint (vec_t in);\r
-vec_t _DotProduct (vec3_t v1, vec3_t v2);\r
-void _VectorSubtract (vec3_t va, vec3_t vb, vec3_t out);\r
-void _VectorAdd (vec3_t va, vec3_t vb, vec3_t out);\r
-void _VectorCopy (vec3_t in, vec3_t out);\r
-void _VectorScale (vec3_t v, vec_t scale, vec3_t out);\r
-\r
-double VectorLength(vec3_t v);\r
-\r
-void VectorMA (vec3_t va, double scale, vec3_t vb, vec3_t vc);\r
-\r
-void CrossProduct (vec3_t v1, vec3_t v2, vec3_t cross);\r
-vec_t VectorNormalize (vec3_t in, vec3_t out);\r
-vec_t ColorNormalize (vec3_t in, vec3_t out);\r
-void VectorInverse (vec3_t v);\r
-\r
-void ClearBounds (vec3_t mins, vec3_t maxs);\r
-void AddPointToBounds (vec3_t v, vec3_t mins, vec3_t maxs);\r
-\r
-#endif\r
+/*
+   Copyright (C) 1999-2007 id Software, Inc. and contributors.
+   For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+   This file is part of GtkRadiant.
+
+   GtkRadiant is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   GtkRadiant is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GtkRadiant; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+#ifndef __MATHLIB__
+#define __MATHLIB__
+
+// mathlib.h
+
+#include <math.h>
+
+#ifdef DOUBLEVEC_T
+typedef double vec_t;
+#else
+typedef float vec_t;
+#endif
+typedef vec_t vec3_t[3];
+
+#define SIDE_FRONT      0
+#define SIDE_ON         2
+#define SIDE_BACK       1
+#define SIDE_CROSS      -2
+
+#define Q_PI    3.14159265358979323846
+
+extern vec3_t vec3_origin;
+
+#define EQUAL_EPSILON   0.001
+
+qboolean VectorCompare( vec3_t v1, vec3_t v2 );
+
+#define DotProduct( x,y ) ( x[0] * y[0] + x[1] * y[1] + x[2] * y[2] )
+#define VectorSubtract( a,b,c ) {c[0] = a[0] - b[0]; c[1] = a[1] - b[1]; c[2] = a[2] - b[2]; }
+#define VectorAdd( a,b,c ) {c[0] = a[0] + b[0]; c[1] = a[1] + b[1]; c[2] = a[2] + b[2]; }
+#define VectorCopy( a,b ) {b[0] = a[0]; b[1] = a[1]; b[2] = a[2]; }
+#define VectorScale( a,b,c ) {c[0] = b * a[0]; c[1] = b * a[1]; c[2] = b * a[2]; }
+#define VectorClear( x ) {x[0] = x[1] = x[2] = 0; }
+#define VectorNegate( x ) {x[0] = -x[0]; x[1] = -x[1]; x[2] = -x[2]; }
+
+vec_t Q_rint( vec_t in );
+vec_t _DotProduct( vec3_t v1, vec3_t v2 );
+void _VectorSubtract( vec3_t va, vec3_t vb, vec3_t out );
+void _VectorAdd( vec3_t va, vec3_t vb, vec3_t out );
+void _VectorCopy( vec3_t in, vec3_t out );
+void _VectorScale( vec3_t v, vec_t scale, vec3_t out );
+
+double VectorLength( vec3_t v );
+
+void VectorMA( vec3_t va, double scale, vec3_t vb, vec3_t vc );
+
+void CrossProduct( vec3_t v1, vec3_t v2, vec3_t cross );
+vec_t VectorNormalize( vec3_t in, vec3_t out );
+vec_t ColorNormalize( vec3_t in, vec3_t out );
+void VectorInverse( vec3_t v );
+
+void ClearBounds( vec3_t mins, vec3_t maxs );
+void AddPointToBounds( vec3_t v, vec3_t mins, vec3_t maxs );
+
+#endif