Categories
How does rand() work?
Hi all! I want to know how this row works: x = 1+ (double)rand() / (double)RAND_MAX*(2 - 1); Output of fractional numbers. RAND_MAX is 32767. Please explain in more detail.
Answer the question
In order to leave comments, you need to log in
It works just like it says in the manual . What exactly are you interested in?
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question