TombEngine/TR5Main/Global/math.cpp

21 lines
381 B
C++
Raw Normal View History

#include "math.h"
#include "vars.h"
// fix "improperly terminated macro invocation"
// fix "expression must have integral or unscoped enum type"
short ANGLE(double angle)
{
return angle * 65536.0 / 360.0;
2019-12-15 16:19:01 +01:00
}
float ANGLEF(short angle)
{
return TR_ANGLE_TO_DEGREES(angle);
}
float frand() {
int randValue = rand();
float result = randValue / (float)RAND_MAX;
return result;
}