Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
trc_random.h File Reference

Go to the source code of this file.

Functions

void trc_set_RNG_seed (int seed)
 
void trc_set_RNG_random_seed (void)
 
int trc_random_int (int min, int max)
 

Function Documentation

◆ trc_random_int()

int trc_random_int ( int  min,
int  max 
)

Returns a random integer between the given range (both values included)

Parameters
minThe minimum value for the random range
maxThe upper limit of the random range

◆ trc_set_RNG_random_seed()

void trc_set_RNG_random_seed ( void  )

◆ trc_set_RNG_seed()

void trc_set_RNG_seed ( int  seed)

Sets the seed for the Random Number Generator to the given seed, use this instead of trc_set_RNG_random_seed if you want control over what seed is being used (useful for testing and replicate states)

Note
Run only ONCE at the start of the program