Thread: Random
View Single Post
 
Reply
Posted 2004-08-11, 05:35 AM in reply to Arbitus's post "Random"
blah = int(rnd(1)*x)+y

Y is the minimum number, and X is the maximum number minus Y.

===

So, for 45-100, the code is:

blah = int(rnd(1)*55)+45

You're basically just generating a number from 0 to 55, and adding 45 to it... make sure to RANDOMIZE TIMER before it though..
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube