]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
some whitespace cleanups and a correction of a comment
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 8 Jul 2002 02:57:02 +0000 (02:57 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 8 Jul 2002 02:57:02 +0000 (02:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2018 d7cf8633-e32d-0410-b094-e92efae38249

mathlib.c

index 80c09fa13c308344b88ac95a7a700eb0e7dc0ec2..7846af91a6a90019e80c7791acd40fc1adbae6e3 100644 (file)
--- a/mathlib.c
+++ b/mathlib.c
@@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <math.h>
 #include "quakedef.h"
 
-void Sys_Error (char *error, ...);
-
 vec3_t vec3_origin = {0,0,0};
 float ixtable[4096];
 
@@ -47,7 +45,7 @@ float m_bytenormals[NUMVERTEXNORMALS][3] =
 {-0.500000, 0.809017, -0.309017}, {-0.525731, 0.850651, 0.000000}, 
 {0.000000, 0.850651, -0.525731}, {-0.238856, 0.864188, -0.442863},
 {0.000000, 0.955423, -0.295242}, {-0.262866, 0.951056, -0.162460}, 
-{0.000000, 1.000000, 0.000000}, {0.000000, 0.955423, 0.295242}, 
+{0.000000, 1.000000, 0.000000}, {0.000000, 0.955423, 0.295242},
 {-0.262866, 0.951056, 0.162460}, {0.238856, 0.864188, 0.442863}, 
 {0.262866, 0.951056, 0.162460}, {0.500000, 0.809017, 0.309017}, 
 {0.238856, 0.864188, -0.442863}, {0.262866, 0.951056, -0.162460}, 
@@ -55,7 +53,7 @@ float m_bytenormals[NUMVERTEXNORMALS][3] =
 {0.716567, 0.681718, 0.147621}, {0.716567, 0.681718, -0.147621}, 
 {0.525731, 0.850651, 0.000000}, {0.425325, 0.688191, 0.587785}, 
 {0.864188, 0.442863, 0.238856}, {0.688191, 0.587785, 0.425325}, 
-{0.809017, 0.309017, 0.500000}, {0.681718, 0.147621, 0.716567}, 
+{0.809017, 0.309017, 0.500000}, {0.681718, 0.147621, 0.716567},
 {0.587785, 0.425325, 0.688191}, {0.955423, 0.295242, 0.000000}, 
 {1.000000, 0.000000, 0.000000}, {0.951056, 0.162460, 0.262866},
 {0.850651, -0.525731, 0.000000}, {0.955423, -0.295242, 0.000000}, 
@@ -70,8 +68,8 @@ float m_bytenormals[NUMVERTEXNORMALS][3] =
 {0.309017, 0.500000, -0.809017}, {0.425325, 0.688191, -0.587785}, 
 {0.442863, 0.238856, -0.864188}, {0.587785, 0.425325, -0.688191}, 
 {0.688191, 0.587785, -0.425325}, {-0.147621, 0.716567, -0.681718}, 
-{-0.309017, 0.500000, -0.809017}, {0.000000, 0.525731, -0.850651}, 
-{-0.525731, 0.000000, -0.850651}, {-0.442863, 0.238856, -0.864188}, 
+{-0.309017, 0.500000, -0.809017}, {0.000000, 0.525731, -0.850651},
+{-0.525731, 0.000000, -0.850651}, {-0.442863, 0.238856, -0.864188},
 {-0.295242, 0.000000, -0.955423}, {-0.162460, 0.262866, -0.951056}, 
 {0.000000, 0.000000, -1.000000}, {0.295242, 0.000000, -0.955423}, 
 {0.162460, 0.262866, -0.951056}, {-0.442863, -0.238856, -0.864188}, 
@@ -94,24 +92,24 @@ float m_bytenormals[NUMVERTEXNORMALS][3] =
 {-0.500000, -0.809017, 0.309017}, {-0.238856, -0.864188, 0.442863},
 {-0.262866, -0.951056, 0.162460}, {-0.864188, -0.442863, 0.238856},
 {-0.809017, -0.309017, 0.500000}, {-0.688191, -0.587785, 0.425325},
-{-0.681718, -0.147621, 0.716567}, {-0.442863, -0.238856, 0.864188}, 
-{-0.587785, -0.425325, 0.688191}, {-0.309017, -0.500000, 0.809017}, 
-{-0.147621, -0.716567, 0.681718}, {-0.425325, -0.688191, 0.587785}, 
-{-0.162460, -0.262866, 0.951056}, {0.442863, -0.238856, 0.864188}, 
-{0.162460, -0.262866, 0.951056}, {0.309017, -0.500000, 0.809017}, 
-{0.147621, -0.716567, 0.681718}, {0.000000, -0.525731, 0.850651}, 
-{0.425325, -0.688191, 0.587785}, {0.587785, -0.425325, 0.688191}, 
-{0.688191, -0.587785, 0.425325}, {-0.955423, 0.295242, 0.000000}, 
-{-0.951056, 0.162460, 0.262866}, {-1.000000, 0.000000, 0.000000}, 
-{-0.850651, 0.000000, 0.525731}, {-0.955423, -0.295242, 0.000000}, 
-{-0.951056, -0.162460, 0.262866}, {-0.864188, 0.442863, -0.238856}, 
-{-0.951056, 0.162460, -0.262866}, {-0.809017, 0.309017, -0.500000}, 
+{-0.681718, -0.147621, 0.716567}, {-0.442863, -0.238856, 0.864188},
+{-0.587785, -0.425325, 0.688191}, {-0.309017, -0.500000, 0.809017},
+{-0.147621, -0.716567, 0.681718}, {-0.425325, -0.688191, 0.587785},
+{-0.162460, -0.262866, 0.951056}, {0.442863, -0.238856, 0.864188},
+{0.162460, -0.262866, 0.951056}, {0.309017, -0.500000, 0.809017},
+{0.147621, -0.716567, 0.681718}, {0.000000, -0.525731, 0.850651},
+{0.425325, -0.688191, 0.587785}, {0.587785, -0.425325, 0.688191},
+{0.688191, -0.587785, 0.425325}, {-0.955423, 0.295242, 0.000000},
+{-0.951056, 0.162460, 0.262866}, {-1.000000, 0.000000, 0.000000},
+{-0.850651, 0.000000, 0.525731}, {-0.955423, -0.295242, 0.000000},
+{-0.951056, -0.162460, 0.262866}, {-0.864188, 0.442863, -0.238856},
+{-0.951056, 0.162460, -0.262866}, {-0.809017, 0.309017, -0.500000},
 {-0.864188, -0.442863, -0.238856}, {-0.951056, -0.162460, -0.262866},
 {-0.809017, -0.309017, -0.500000}, {-0.681718, 0.147621, -0.716567},
-{-0.681718, -0.147621, -0.716567}, {-0.850651, 0.000000, -0.525731}, 
-{-0.688191, 0.587785, -0.425325}, {-0.587785, 0.425325, -0.688191}, 
-{-0.425325, 0.688191, -0.587785}, {-0.425325, -0.688191, -0.587785}, 
-{-0.587785, -0.425325, -0.688191}, {-0.688191, -0.587785, -0.425325}, 
+{-0.681718, -0.147621, -0.716567}, {-0.850651, 0.000000, -0.525731},
+{-0.688191, 0.587785, -0.425325}, {-0.587785, 0.425325, -0.688191},
+{-0.425325, 0.688191, -0.587785}, {-0.425325, -0.688191, -0.587785},
+{-0.587785, -0.425325, -0.688191}, {-0.688191, -0.587785, -0.425325},
 };
 
 qbyte NormalToByte(const vec3_t n)
@@ -158,7 +156,7 @@ float Q_RSqrt(float number)
 void PerpendicularVector( vec3_t dst, const vec3_t src )
 {
        // LordHavoc: optimized to death and beyond
-       int     pos;
+       int pos;
        float minelem;
 
        if (src[0])
@@ -241,9 +239,9 @@ void VectorVectorsDouble(const double *forward, double *right, double *up)
 
 void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, float degrees )
 {
-       float   t0, t1;
-       float   angle, c, s;
-       vec3_t  vr, vu, vf;
+       float t0, t1;
+       float angle, c, s;
+       vec3_t vr, vu, vf;
 
        angle = DEG2RAD(degrees);
 
@@ -466,13 +464,13 @@ void AngleMatrix (const vec3_t angles, const vec3_t translate, vec_t matrix[][4]
 }
 
 
-// LordHavoc: renamed these to Length, and made the normal ones #define
+// LordHavoc: renamed this to Length, and made the normal one a #define
 float VectorNormalizeLength (vec3_t v)
 {
-       float   length, ilength;
+       float length, ilength;
 
        length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
-       length = sqrt (length);         // FIXME
+       length = sqrt (length);
 
        if (length)
        {
@@ -494,15 +492,15 @@ R_ConcatRotations
 */
 void R_ConcatRotations (const float in1[3*3], const float in2[3*3], float out[3*3])
 {
-       out[0*3+ 0] = in1[0*3+0] * in2[0*3+0] + in1[0*3+1] * in2[1*3+0] + in1[0*3+2] * in2[2*3+0];
-       out[0*3+ 1] = in1[0*3+0] * in2[0*3+1] + in1[0*3+1] * in2[1*3+1] + in1[0*3+2] * in2[2*3+1];
-       out[0*3+ 2] = in1[0*3+0] * in2[0*3+2] + in1[0*3+1] * in2[1*3+2] + in1[0*3+2] * in2[2*3+2];
-       out[1*3+ 0] = in1[1*3+0] * in2[0*3+0] + in1[1*3+1] * in2[1*3+0] + in1[1*3+2] * in2[2*3+0];
-       out[1*3+ 1] = in1[1*3+0] * in2[0*3+1] + in1[1*3+1] * in2[1*3+1] + in1[1*3+2] * in2[2*3+1];
-       out[1*3+ 2] = in1[1*3+0] * in2[0*3+2] + in1[1*3+1] * in2[1*3+2] + in1[1*3+2] * in2[2*3+2];
-       out[2*3+ 0] = in1[2*3+0] * in2[0*3+0] + in1[2*3+1] * in2[1*3+0] + in1[2*3+2] * in2[2*3+0];
-       out[2*3+ 1] = in1[2*3+0] * in2[0*3+1] + in1[2*3+1] * in2[1*3+1] + in1[2*3+2] * in2[2*3+1];
-       out[2*3+ 2] = in1[2*3+0] * in2[0*3+2] + in1[2*3+1] * in2[1*3+2] + in1[2*3+2] * in2[2*3+2];
+       out[0*3+0] = in1[0*3+0] * in2[0*3+0] + in1[0*3+1] * in2[1*3+0] + in1[0*3+2] * in2[2*3+0];
+       out[0*3+1] = in1[0*3+0] * in2[0*3+1] + in1[0*3+1] * in2[1*3+1] + in1[0*3+2] * in2[2*3+1];
+       out[0*3+2] = in1[0*3+0] * in2[0*3+2] + in1[0*3+1] * in2[1*3+2] + in1[0*3+2] * in2[2*3+2];
+       out[1*3+0] = in1[1*3+0] * in2[0*3+0] + in1[1*3+1] * in2[1*3+0] + in1[1*3+2] * in2[2*3+0];
+       out[1*3+1] = in1[1*3+0] * in2[0*3+1] + in1[1*3+1] * in2[1*3+1] + in1[1*3+2] * in2[2*3+1];
+       out[1*3+2] = in1[1*3+0] * in2[0*3+2] + in1[1*3+1] * in2[1*3+2] + in1[1*3+2] * in2[2*3+2];
+       out[2*3+0] = in1[2*3+0] * in2[0*3+0] + in1[2*3+1] * in2[1*3+0] + in1[2*3+2] * in2[2*3+0];
+       out[2*3+1] = in1[2*3+0] * in2[0*3+1] + in1[2*3+1] * in2[1*3+1] + in1[2*3+2] * in2[2*3+1];
+       out[2*3+2] = in1[2*3+0] * in2[0*3+2] + in1[2*3+1] * in2[1*3+2] + in1[2*3+2] * in2[2*3+2];
 }