aboutsummaryrefslogtreecommitdiffstats
path: root/random.h
diff options
context:
space:
mode:
authorThomas Gschwantner <tharre3@gmail.com>2019-09-28 18:59:31 +0200
committerThomas Gschwantner <tharre3@gmail.com>2019-09-28 19:04:23 +0200
commit73ec28ebcaef074f51293e9e6c7088008025773c (patch)
treeb2108e7ca96b4075b38f0f23606b8743a516c9a9 /random.h
parentFixup client, including a lot of refactoring (diff)
downloadwg-dynamic-73ec28ebcaef074f51293e9e6c7088008025773c.tar.xz
wg-dynamic-73ec28ebcaef074f51293e9e6c7088008025773c.zip
Fix random_bounded() to always be in [0, bound)
Previously random_bounded(1) would return values in [0, 1], while values > 1 would return [0, bound).
Diffstat (limited to '')
-rw-r--r--random.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/random.h b/random.h
index 04271a4..9654b2c 100644
--- a/random.h
+++ b/random.h
@@ -8,6 +8,7 @@
#include <stdint.h>
+uint64_t random_u64();
uint64_t random_bounded(uint64_t bound);
#endif