michaelsoftman Posted January 8, 2013 Posted January 8, 2013 Does rnd() generate a number between 0 and x or 1 and x? In other words, would rnd()%18 generate a random number between 0 and 18 or 1 and 18? Quote
clydelion Posted January 8, 2013 Posted January 8, 2013 between 0 and x-1. in your example: 0~17 Quote
Lighta Posted January 8, 2013 Posted January 8, 2013 That 2 question, you can't really said in other word. rnd() : /// Generates a random number in the interval [0, SINT32_MAX] % : modulo sign, return the rest of division => y%x = [0;x-1] Quote
Question
michaelsoftman
Does rnd() generate a number between 0 and x or 1 and x?
In other words, would rnd()%18 generate a random number between 0 and 18 or 1 and 18?
2 answers to this question
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.