Updated project to use eclipse build tools and make system.
[C-Data-Structures.git] / lib_random.c
blob34313527e3e2bc05e4f3177f61ae5a516f4b2b4b
1 #include <assert.h>
2 #include <limits.h>
3 #include <stdlib.h>
4 #include <time.h>
6 #include "lib_random.h"
8 int random_int(int min, int max)
10 assert(min > INT_MIN);
11 assert(max < INT_MAX / 2);
12 assert(max >= min);
13 return rand() % max + min;
16 void random_seed()
18 srand(time(0));