move DEG2RAD macro to mathlib.h.

From a patch by Andrei Drexler
This commit is contained in:
Ozkan Sezer 2022-03-11 23:55:10 +03:00
parent 144b43f333
commit c5a45e7e58
3 changed files with 16 additions and 19 deletions

View file

@ -274,6 +274,7 @@ qboolean R_CullBox (vec3_t emins, vec3_t emaxs)
mplane_t *p;
byte signbits;
float vec[3];
for (i = 0;i < 4;i++)
{
p = frustum + i;
@ -387,7 +388,6 @@ assumes side and forward are perpendicular, and normalized
to turn away from side, use a negative angle
===============
*/
#define DEG2RAD( a ) ( (a) * M_PI_DIV_180 )
void TurnVector (vec3_t out, const vec3_t forward, const vec3_t side, float angle)
{
float scale_forward, scale_side;

View file

@ -29,9 +29,6 @@ vec3_t vec3_origin = {0,0,0};
/*-----------------------------------------------------------------*/
//#define DEG2RAD( a ) ( a * M_PI ) / 180.0F
#define DEG2RAD( a ) ( (a) * M_PI_DIV_180 ) //johnfitz
void ProjectPointOnPlane( vec3_t dst, const vec3_t p, const vec3_t normal )
{
float d;
@ -322,7 +319,6 @@ float VectorNormalize (vec3_t v)
}
return length;
}
void VectorInverse (vec3_t v)

View file

@ -33,6 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif
#define M_PI_DIV_180 (M_PI / 180.0) //johnfitz
#define DEG2RAD(a) ((a) * M_PI_DIV_180)
struct mplane_s;