mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Animated particlespawners and more (#11545)
Co-authored-by: Lars Mueller <appgurulars@gmx.de> Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: Dmitry Kostenko <codeforsmile@gmail.com>
This commit is contained in:
parent
8724fe6e3f
commit
20bd6bdb68
17 changed files with 1986 additions and 279 deletions
|
@ -46,11 +46,22 @@ void myrand_bytes(void *out, size_t len)
|
|||
g_pcgrand.bytes(out, len);
|
||||
}
|
||||
|
||||
float myrand_float()
|
||||
{
|
||||
u32 uv = g_pcgrand.next();
|
||||
return (float)uv / (float)U32_MAX;
|
||||
}
|
||||
|
||||
int myrand_range(int min, int max)
|
||||
{
|
||||
return g_pcgrand.range(min, max);
|
||||
}
|
||||
|
||||
float myrand_range(float min, float max)
|
||||
{
|
||||
return (max-min) * myrand_float() + min;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
64-bit unaligned version of MurmurHash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue