Author
|
Message
|
Senior Member
|
07-05-2024
, 02:05
How to get multiple non-repeating random numbers
|
#1
|
GetRandomInt can only get one number, I want to get multiple non-repeating numbers, and I need to limit the number of random numbers obtained from not coexisting
Example:
Random number = {A,B,C,D,E,0,1,2,3,4}, get 3 of them and cannot repeat
When A and 0 cannot coexist
Random Number = A, B, C (Correct)
Random number = A,0,4 (false)
__________________
Please forgive, If I'm not describing it accurately. I use google translate
Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:
Last edited by ZBzibing; 07-05-2024 at 11:05.
|
|
|
|