Raised This Month: $43 Target: $400
 10% 

How to get multiple non-repeating random numbers


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ZBzibing
Senior Member
Join Date: Dec 2012
Old 07-05-2024 , 02:05   How to get multiple non-repeating random numbers
Reply With Quote #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.
ZBzibing is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode