Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Functions
#4
The time function t() and updateSeed() work together - you only need those if you want to re-seed.

randomBase gives you a number from 0-255 (very quickly)

randomBin (with an awful name. Should probably be randomLimit) gives you 0-n

You can probably see it's trivial to do other ranges.

10-20 would be randomBin(10)+10 for example.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)