Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add random number generator #3

Open
lefticus opened this issue Feb 22, 2017 · 4 comments
Open

Add random number generator #3

lefticus opened this issue Feb 22, 2017 · 4 comments

Comments

@lefticus
Copy link
Member

No description provided.

@RobLoach
Copy link
Contributor

RobLoach commented Oct 13, 2017

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....
#4

Could be good to follow the same modal as math.random() in Lua.

@radiumx3
Copy link

any Eta?

@RobLoach
Copy link
Contributor

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.

@diamante0018
Copy link

Am I too late to say this would be very useful?
I would much appreciate it if someone decided to work on this.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants