Random Integers, No Repeats
|
08-09-2023, 03:50 PM
Post: #6
|
|||
|
|||
RE: Random Integers, No Repeats
(08-09-2023 04:54 AM)Joe Horn Wrote: ... rand(X,Y,Z) returns X random integers between Y and Z without repeats. Example: rand(10,50,59) returns all 10 integers between 50 and 59 in random order. It's faster than creating an array and then shuffling it. I would bet that rand uses the Fisher-Yates algorithm internally. The G2 is very fast and so is Fisher-Yates. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)