Resource icon

[Open Assets] Lightweight high-quality RNG (LRNG) 1.1

This content may be freely modified and/or maintained by anyone.

tertu

cheap spirit
tertu submitted a new resource:

FlowerRNG Lite - Minimalistic RNG implementation

FlowerRNG Lite is a minimalistic RNG library that you can incorporate into your own code. There are no protections, and states are simply Lua tables containing 4 numbers.

A minimal version of it fits into this post:
FlowerRNG Lite Minimal:
local LRNG = {}

--Returns 32 bits of random data as an integer that can be negative.
local function rng_next(state)
    local b, c, counter = state[2], state[3], state[4]
    local output = state[1] + b + counter
    state[4] =...

Read more about this resource...
 
What does this do exactly?
It's a random number generator library. It doesn't do anything on its own but if you need an additional random number source for any reason, you can use it. The main advantage it has over some older libraries is that it's way higher quality, but it isn't the only high-quality one by any means.
 
Last edited:

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top