ChaiScript_Extras
ChaiScript_Extras copied to clipboard
Add random number generator
Use C++11's random number generator to expose two wrapper functions to ChaiScript...
rand() // Random int between 0 and RAND_MAX
rand(max)
rand(min, max)
srand(seed)
Been trying to build ChaiScript_Extras in order to add such functions, but am running into compilation errors.... https://github.com/ChaiScript/ChaiScript_Extras/issues/4
Could be good to follow the same modal as math.random()
in Lua.
any Eta?
No one's worked on it. I have made a small wrapper for https://github.com/effolkronium/random ... Could port it to a ChaiScript module.
Am I too late to say this would be very useful? I would much appreciate it if someone decided to work on this. Thanks.