23 float half = (
float) multiple / 2.0
f;
29 return (
float) (((
int) x / multiple) * multiple);
40 }
while (i_rval == RAND_MAX);
55 rval = rval * (max - min) + min;
68 while (--chance > 0.0
f)
69 if (
frand() < frametime)
72 return frand() < (frametime * (chance + 1.0f));
float frand_range(float min, float max)
Return a floating point number in the range min..max.
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
int rand_chance(float frametime, float chance)
Call this in the frame interval to get TRUE chance times per second.
float fl_roundoff(float x, int multiple)
Rounds off a floating point number to a multiple of some number.
GLint GLint GLint GLint GLint x
typedef float(SCP_EXT_CALLCONV *SCPTRACKIR_PFFLOATVOID)()
float frand()
Return random value in range 0.0..1.0- (1.0- means the closest number less than 1.0)