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
include
asw
modules
random.h
Go to the documentation of this file.
1
8
9
#ifndef ASW_RANDOM_H
10
#define ASW_RANDOM_H
11
12
namespace
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
asw::random
Definition
random.cpp:5
asw::random::between
int between(int min, int max)
Generate a random integer between min and max.
Definition
random.cpp:17
asw::random::chance
bool chance()
Generate a random boolean.
Definition
random.cpp:32
asw::random::random
int random(int max)
Generate a random integer between 0 and max.
Definition
random.cpp:12
Generated by
1.12.0