mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
Use secure randomness to seed internal RNG
This commit is contained in:
parent
785c042f1f
commit
1281173e50
4 changed files with 18 additions and 18 deletions
|
@ -20,7 +20,7 @@ u32 myrand()
|
|||
return g_pcgrand.next();
|
||||
}
|
||||
|
||||
void mysrand(unsigned int seed)
|
||||
void mysrand(u64 seed)
|
||||
{
|
||||
g_pcgrand.seed(seed);
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ inline float wrapDegrees_180(float f)
|
|||
*/
|
||||
#define MYRAND_RANGE 0xffffffff
|
||||
u32 myrand();
|
||||
void mysrand(unsigned int seed);
|
||||
void mysrand(u64 seed);
|
||||
void myrand_bytes(void *out, size_t len);
|
||||
int myrand_range(int min, int max);
|
||||
float myrand_range(float min, float max);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue