1
0
src/wip/rogue/random.h
2023-11-25 11:23:42 -07:00

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))