Modular rendering system. Patch by use.less01

This might break MSVC builds. I'll take care of it later
This commit is contained in:
Thilo Schulz 2011-08-01 01:19:55 +00:00
parent 8ab958fab9
commit 40dfcee06e
24 changed files with 335 additions and 186 deletions

View file

@ -1011,3 +1011,32 @@ int Q_isnan( float x )
return (int)( (unsigned int)fi.ui >> 31 );
}
//------------------------------------------------------------------------
#ifndef Q3_VM
/*
=====================
Q_acos
the msvc acos doesn't always return a value between -PI and PI:
int i;
i = 1065353246;
acos(*(float*) &i) == -1.#IND0
=====================
*/
float Q_acos(float c) {
float angle;
angle = acos(c);
if (angle > M_PI) {
return (float)M_PI;
}
if (angle < -M_PI) {
return (float)M_PI;
}
return angle;
}
#endif