NXC RNG: Mersenne Twister
Here’s an example use of my implementation of the MT19937 Pseudo-Random Number Generator algorithm for NXC:
#include "MersenneTwister.h.nxc"
#include "random_ul.h.nxc"
#include "uniform_int.h.nxc"
#define MAX 10
task main()
{
MT_srand();
NumOut(0, 0, urand(MAX));
Wait(2000);
}
The repository/sources can be found here.






First!
Kidding.
Hey, Uh, this is kinda off-topic, but…
Hai, it’s me, 2Tie.
I could possibly finish up my Mario engine…
And I see that there’s another one (or two?) finished already, but…
I kinda have the motivation to finish it now.
Would you want me to?
Sure, if you want.
You should ask at the MindBoards forums; you’ll get more enthusiasm from others than you just got from me.
EDIT: Looks like you already did that!
hi muntoo,
where can I find the Mersenne Twister library?
Sorry for taking so long to reply. The NXC RNG library contains an implementation for MT19937.