diff options
| author | nic-gaffney <gaffney_nic@protonmail.com> | 2023-06-25 19:41:03 -0500 |
|---|---|---|
| committer | nic-gaffney <gaffney_nic@protonmail.com> | 2023-06-25 19:41:03 -0500 |
| commit | 28ab9c8ba094d86dbcb9abb853dddd83dca028cc (patch) | |
| tree | b30f3ff0218555270cde4c99c89fa866a4ad324a /std/stdmath.c | |
| parent | bf647e430e3a3642c8199dc81a411d5e1586cabb (diff) | |
| download | sloth-28ab9c8ba094d86dbcb9abb853dddd83dca028cc.tar.gz | |
Standard library updated and llvm-sys added to cargo.toml
Diffstat (limited to 'std/stdmath.c')
| -rw-r--r-- | std/stdmath.c | 11 |
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; +} |
