3 lines
132 B
C
3 lines
132 B
C
#define get_rand(x, y) (((rand() % ((y) - (x))) + 1) + (x)) /* 0 index */
|
|
#define rand_percent(odds) ((get_rand(1, 100)) <= (odds))
|