RandomGenerator
EditA RandomGenerator is a standalone object that can be used to independently generate pseudo-random numbers. If you just need basic randomness, you can use lovr.math.random without needing to create a random generator.
Constructor
| lovr.math.newRandomGenerator | Create a new RandomGenerator. |
Methods
| RandomGenerator:getSeed | Get the seed value of the RandomGenerator. |
| RandomGenerator:getState | Get the current state of the RandomGenerator. |
| RandomGenerator:random | Get a random number. |
| RandomGenerator:randomNormal | Get a random number from a normal distribution. |
| RandomGenerator:setSeed | Reinitialize the RandomGenerator with a new seed. |
| RandomGenerator:setState | Set the state of the RandomGenerator. |
| Object:release | Immediately release the Lua reference to an object. |
| Object:type | Get the type name of the object. |