ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
random.h
Go to the documentation of this file.
1
8
9#ifndef ASW_RANDOM_H
10#define ASW_RANDOM_H
11
12namespace asw::random {
13
19 int random(int max);
20
27 int between(int min, int max);
28
34 float random(float max);
35
42 float between(float min, float max);
43
49 bool chance();
50
57 bool chance(float chance);
58
59} // namespace asw::random
60
61#endif // ASW_RANDOM_H
int between(int min, int max)
Generate a random integer between min and max.
Definition random.cpp:17
bool chance()
Generate a random boolean.
Definition random.cpp:32
int random(int max)
Generate a random integer between 0 and max.
Definition random.cpp:12