aboutsummaryrefslogtreecommitdiff
path: root/std/stdmath.c
diff options
context:
space:
mode:
authornic-gaffney <gaffney_nic@protonmail.com>2023-06-25 19:41:03 -0500
committernic-gaffney <gaffney_nic@protonmail.com>2023-06-25 19:41:03 -0500
commit28ab9c8ba094d86dbcb9abb853dddd83dca028cc (patch)
treeb30f3ff0218555270cde4c99c89fa866a4ad324a /std/stdmath.c
parentbf647e430e3a3642c8199dc81a411d5e1586cabb (diff)
downloadsloth-28ab9c8ba094d86dbcb9abb853dddd83dca028cc.tar.gz
Standard library updated and llvm-sys added to cargo.toml
Diffstat (limited to 'std/stdmath.c')
-rw-r--r--std/stdmath.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/std/stdmath.c b/std/stdmath.c
new file mode 100644
index 0000000..c9a91c3
--- /dev/null
+++ b/std/stdmath.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+int randGen(int min, int max) {
+ time_t t;
+
+ srand((unsigned) time(&t));
+
+ return rand() % (max - min + 1) + min;
+}