| ??? 12/25/03 21:57 Read: times |
#61390 - RE: Random number from 1 to 8 Responding to: ???'s previous message |
hi,
newRand = 1 + rand()%8;or newRand = 1 + rand()&7;The qustion is is my newRand variable as good random as the rand() function? depend on what do you call "good". I preffer to use own pseudo-random function based on shift-register with XOR gates. A timer low byte is used as the start value (except zero of course) when some event occures from user manipulation. cu |



