Plaquette
Loading...
Searching...
No Matches
pq_random32.h
1
/*
2
* pq_random32.h
3
*
4
* Provides methods for generating 32-bits random numbers.
5
*
6
* (c) 2008 Sofian Audry -- info(@)sofianaudry(.)com
7
*
8
* This program is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
#ifndef RANDOM_32_H_
22
#define RANDOM_32_H_
23
24
#include <limits.h>
25
#include <stdlib.h>
26
#include <inttypes.h>
27
28
namespace
pq {
29
30
// 32-bit random number generator max value.
31
constexpr
uint32_t RANDOM_32_MAX = UINT32_MAX;
32
33
// 32-bit random numbers generator.
34
uint32_t random32();
35
37
void
random32Seed(uint64_t seed);
38
40
void
random32Seed(uint64_t s, uint64_t inc);
41
42
}
// namespace pq
43
44
#endif
src
pq_random32.h
Generated on Thu Nov 6 2025 12:47:54 for Plaquette by
1.9.8