previously we overwrote the built-in random function in Lua with the true RNG in the STM32.
this just aliases 'normal' (pseudo) RNG with a leading s (for seeded).
usage:
-- print some seeded random numbers
print(math.srandom()) --> 0.690001
print(math.srandom()) --> 0.5054184
-- reset crow
^^r
-- printing srandom again will produce the same sequence
print(math.srandom()) --> 0.690001
print(math.srandom()) --> 0.5054184
-- you can seed the PRNG yourself
math.srandomseed(314)
print(math.srandom()) --> 0.7310537
-- re-seeding to the same number always produces the same sequence
math.srandomseed(314)
print(math.srandom()) --> 0.7310537
previously we overwrote the built-in random function in Lua with the true RNG in the STM32.
this just aliases 'normal' (pseudo) RNG with a leading
s
(for seeded).usage: