21 lines
327 B
C
21 lines
327 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "pxl8_types.h"
|
||
|
|
|
||
|
|
typedef struct pxl8_rng {
|
||
|
|
u32 state;
|
||
|
|
} pxl8_rng;
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
void pxl8_rng_seed(pxl8_rng* rng, u32 seed);
|
||
|
|
u32 pxl8_rng_next(pxl8_rng* rng);
|
||
|
|
f32 pxl8_rng_f32(pxl8_rng* rng);
|
||
|
|
i32 pxl8_rng_range(pxl8_rng* rng, i32 min, i32 max);
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
}
|
||
|
|
#endif
|