< index < 9. Pseudorandom number generator < 9.3 Getting a random int from a byte array |
===================================== |
C++ : TCODRandom::~TCODRandom() C : void TCOD_random_delete(TCOD_random_t mersenne) Py : random_delete(mersenne)
Parameter | Description |
---|---|
mersenne | In the C version, the generator handler, returned by the initialization functions. |
C++ : // create a generator TCODRandom *rnd = new TCODRandom(); // use it ... // destroy it delete rnd; C : /* create a generator */ TCOD_random_t rnd = TCOD_random_new(); /* use it */ ... /* destroy it */ TCOD_random_delete(rnd); Py : # create a generator rnd = libtcod.random_new() # use it ... # destroy it libtcod.random_delete(rnd)