// assumes "src" is normalized
void PerpendicularVector( vec3_t dst, const vec3_t src )
{
- // LordHavoc: optimized to death and beyond
+ // LadyHavoc: optimized to death and beyond
int pos;
float minelem;
#endif
-// LordHavoc: like AngleVectors, but taking a forward vector instead of angles, useful!
+// LadyHavoc: like AngleVectors, but taking a forward vector instead of angles, useful!
void VectorVectors(const vec3_t forward, vec3_t right, vec3_t up)
{
// NOTE: this is consistent to AngleVectors applied to AnglesFromVectors
}
}
-// LordHavoc: calculates pitch/yaw/roll angles from forward and up vectors
+// LadyHavoc: calculates pitch/yaw/roll angles from forward and up vectors
void AnglesFromVectors (vec3_t angles, const vec3_t forward, const vec3_t up, qboolean flippitch)
{
if (forward[0] == 0 && forward[1] == 0)
#endif
-// LordHavoc: renamed this to Length, and made the normal one a #define
+// LadyHavoc: renamed this to Length, and made the normal one a #define
float VectorNormalizeLength (vec3_t v)
{
float length, ilength;
{
int a;
- // LordHavoc: setup 1.0f / N table for quick recipricols of integers
+ // LadyHavoc: setup 1.0f / N table for quick recipricols of integers
ixtable[0] = 0;
for (a = 1;a < 4096;a++)
ixtable[a] = 1.0f / a;
}
}
-// LordHavoc: this has to be done right or you get severe precision breakdown
+// LadyHavoc: this has to be done right or you get severe precision breakdown
int LoopingFrameNumberFromDouble(double t, int loopframes)
{
if (loopframes)
static void mul128(const unsigned int a[], const unsigned int b[], unsigned int dest[4])
{
-#ifdef __GNUC__
- unsigned __int128 ia = (a[0] << 96) + (a[1] << 64) + (a[2] << 32) + (a[3]);
- unsigned __int128 ib = (b[0] << 96) + (b[1] << 64) + (b[2] << 32) + (b[3]);
+#if 0 //defined(__GNUC__) && defined(__x86_64__)
+ unsigned __int128 ia = ((__int128)a[0] << 96) | ((__int128)a[1] << 64) | ((__int128)a[2] << 32) | (a[3]);
+ unsigned __int128 ib = ((__int128)b[0] << 96) | ((__int128)b[1] << 64) | ((__int128)b[2] << 32) | (b[3]);
unsigned __int128 id = ia * ib;
dest[0] = (id >> 96) & 0xffffffff;
dest[1] = (id >> 64) & 0xffffffff;
#endif
}
-void testmul128(unsigned int a0, unsigned int a1, unsigned int a2, unsigned int a3, unsigned int b0, unsigned int b1, unsigned int b2, unsigned int b3, unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x3)
+static void testmul128(unsigned int a0, unsigned int a1, unsigned int a2, unsigned int a3, unsigned int b0, unsigned int b1, unsigned int b2, unsigned int b3, unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x3)
{
unsigned int a[4];
unsigned int b[4];