Librarian Posted August 25, 2022 Share Posted August 25, 2022 (edited) int count = chi('count'); float seed = chf('seed'); int iarr[] = array(); for (int i = 0;i<@numpt;i++){ iarr[i]=i; } function void shuffle( int a[];float seed float b[] = {}; for(int i = 0;i<len(a);i++){ push(b,rand(i+seed)); } int c[] = argsort(b); a = reorder(a,c); } shuffle(iarr,seed); i[]@arr = iarr; i@variant = iarr[@ptnum]%count; //i@variant = floor(rand(@ptnum)*count); function void shuffle( int a[];float seed this Line its Wrong total Stop Solved "function void shuffle(int a[];float seed ){" Edited August 25, 2022 by Librarian Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.