mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-08-23 16:06:40 +02:00
add small helper to scalar range
This commit is contained in:
@@ -7,7 +7,7 @@ namespace MM::Random {
|
||||
|
||||
// Seeded (Pseudo-) Random Number Generator
|
||||
struct SRNG {
|
||||
// make shuffle compat
|
||||
// make shuffle compat
|
||||
// TODO: add more type info
|
||||
using result_type = uint32_t;
|
||||
|
||||
@@ -35,7 +35,7 @@ struct SRNG {
|
||||
}
|
||||
|
||||
bool roll(float prob) {
|
||||
return zeroToOne() <= prob;
|
||||
return zeroToOne() <= prob; // TODO: just < ?
|
||||
}
|
||||
|
||||
// more advanced
|
||||
|
Reference in New Issue
Block a user