Skip to main content
GameDev.net gamedev.net
🔒 Locked

Fast random numbers

Started by Austrian Coder Jan 17, 2003 at 12:10 PM 2 replies 350+ views
Original Post
Austrian Coder
Austrian Coder
Hi! I have here a little problem. I have found a fast algo for radom numbers, but if i say generate a number between 1 and 11 then it never generates a number which is heigher then 9 So have you a simple but fast random number generator for int between 1 - 11 ? Thanks
prh99
prh99
quote:
Original post by Austrian Coder
Hi!

I have here a little problem. I have found a fast algo for radom numbers, but if i say generate a number between 1 and 11 then it never generates a number which is heigher then 9
So have you a simple but fast random number generator for int between 1 - 11 ?

Thanks


You can look up the Mersenne Twister pseudo random number generator.

Patrick

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.