mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-31 09:01:54 +00:00
Modular rendering system. Patch by use.less01
This might break MSVC builds. I'll take care of it later
This commit is contained in:
parent
8ab958fab9
commit
40dfcee06e
24 changed files with 335 additions and 186 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue