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-12-11 06:22:17 +0100
commit4a12b8eff80d369ab3b220aa9d533faf88dd4df9 (patch)
tree46767f57b47084507b9c41c8cf990f72922689b3 /random.h
parentFixup client, including a lot of refactoring (diff)
downloadwg-dynamic-4a12b8eff80d369ab3b220aa9d533faf88dd4df9.tar.xz
wg-dynamic-4a12b8eff80d369ab3b220aa9d533faf88dd4df9.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