aboutsummaryrefslogtreecommitdiff
path: root/std/stdmath.c
blob: f7f79c6b356e6b1324ea33cbac677e44a742971a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

bool random_setup = false;

int randGen(int min, int max) {
   if random_setup == false {
      srandom(time(NULL));
      random_setup = true;
   }
   return random() % (max - min + 1) + min;
}