option.c: fixed warnings
[k8jam.git] / src / bjprng.h
blob9f5426f3fd74844cfb269655ccf182b7350b4c99
1 /* coded by Ketmar // Vampire Avalon (psyc://ketmar.no-ip.org/~Ketmar)
2 * Understanding is not required. Only obedience.
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, version 3 of the License ONLY.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #ifndef _BJPRNG_H_
17 #define _BJPRNG_H_
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
23 #include <stdint.h>
25 // *Really* minimal PCG32 code / (c) 2014 M.E. O'Neill / pcg-random.org
26 // Licensed under Apache License 2.0 (NO WARRANTY, etc. see website)
27 typedef struct { uint64_t state, inc; } pcg32_random_t;
28 #define BJRandCtx pcg32_random_t
31 extern void bjprngRandomize (BJRandCtx *rng);
32 extern uint32_t bjprngRand (BJRandCtx *rng);
35 #ifdef __cplusplus
37 #endif
38 #endif