2019-11-30 13:51:37 +01:00
|
|
|
#include "math.h"
|
2019-12-22 00:20:10 +01:00
|
|
|
#include "vars.h"
|
2019-11-30 13:51:37 +01:00
|
|
|
|
|
|
|
// fix "improperly terminated macro invocation"
|
|
|
|
// fix "expression must have integral or unscoped enum type"
|
2019-12-17 21:46:50 -03:00
|
|
|
short ANGLE(double angle)
|
2019-11-30 13:51:37 +01:00
|
|
|
{
|
2019-12-17 21:46:50 -03:00
|
|
|
return angle * 65536.0 / 360.0;
|
2019-12-15 16:19:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
float ANGLEF(short angle)
|
|
|
|
{
|
|
|
|
return TR_ANGLE_TO_DEGREES(angle);
|
2019-12-22 00:20:10 +01:00
|
|
|
}
|
2019-12-28 00:12:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
float frand() {
|
|
|
|
int randValue = rand();
|
|
|
|
float result = randValue / (float)RAND_MAX;
|
|
|
|
return result;
|
|
|
|
}
|