diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2015-03-22 15:27:39 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2015-03-22 15:27:39 +0000 |
commit | 6a3895598cae5476f386f9f6976fc0475cecfafc (patch) | |
tree | 6b3cb3642fa42797620708de24eaa38f0901649d | |
parent | 9c9a39f34a3cc66689796b11242e9fb537d4b6c7 (diff) | |
download | c-stuff-6a3895598cae5476f386f9f6976fc0475cecfafc.tar.gz c-stuff-6a3895598cae5476f386f9f6976fc0475cecfafc.tar.xz c-stuff-6a3895598cae5476f386f9f6976fc0475cecfafc.zip |
randtest.c no longer does something idiotic.
-rw-r--r-- | randtest.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -27,7 +27,7 @@ static unsigned rand_to_max(unsigned max) while ((random = rand()) == (double)RAND_MAX); - return random / (double)RAND_MAX * (double)(max + 1); + return random / (double)RAND_MAX * (double)max; } int main(int argc, char **argv) |