I need to get random numbers that are uniform distributed.
The issue is I need every time the app start to check for some MAX number and then go randomly on all the numbers from 0 to MAX without passing twice on same number (till a round up).
Now I’m using: arc4random()%maxNumber
But that really problematic because I get lots on return even 3 times on same number in a row.
Please help.
This is what I finally did:
If you use it pay attention to releasing the object, Also, I think I might miss one number (not sure) on my case it doesn’t matter so…