From 4b2ea2ca00eea7feea036b7642c0c1443b8f77a1 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 3 May 2020 20:20:22 -0700 Subject: removed buggy qsort header and implemented myself --- include/libn.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/libn.h') 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); -- cgit v1.2.1