aboutsummaryrefslogtreecommitdiff
path: root/include/libn.h
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-05-03 20:20:22 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-05-03 20:20:22 -0700
commit4b2ea2ca00eea7feea036b7642c0c1443b8f77a1 (patch)
tree5cdd635bd8240a6857258a056e3932e00966bfff /include/libn.h
parent6b739739968a0cc9b4d9909d8f4ffec30f4461dd (diff)
removed buggy qsort header and implemented myself
Diffstat (limited to 'include/libn.h')
-rw-r--r--include/libn.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libn.h b/include/libn.h
index 063a408..8e30eae 100644
--- a/include/libn.h
+++ b/include/libn.h
@@ -311,3 +311,11 @@ void sort·floats(uintptr n, float arr[]);
void sort·doubles(uintptr n, double arr[]);
void sort·strings(uintptr n, byte* arr[]);
+
+// -----------------------------------------------------------------------------
+// fast random number generation
+
+error rng·init(uint64 seed);
+double rng·random();
+bool rng·bernoulli(double f);
+uint64 rng·randi(int max);