aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/inc/random.h
blob: 6360625a9a6155d8b190cf017f1cbb0fde050ded (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// MIT License, Copyright (c) 2020 Marvin Borner

#ifndef RANDOM_H
#define RANDOM_H

#include <def.h>

#define rand_range(min, max) (rand() % ((max) + 1 - (min)) + (min))

void srand(u32 seed);
u32 rand(void);
char *randstr(u32 size);

#endif