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

Use PRNG from inkjs #188

Open
joethephish opened this issue Sep 21, 2016 · 1 comment
Open

Use PRNG from inkjs #188

joethephish opened this issue Sep 21, 2016 · 1 comment

Comments

@joethephish
Copy link
Member

As mentioned in y-lohse/inkjs#31, make use of the nice simple custom PRNG implementation to be consistent between ink runtime implementations.

This is the reference implementation.

@Glidias
Copy link

Glidias commented Sep 23, 2016

The PRNG for haxe is similar,
https://github.com/Glidias/inkhaxe/blob/master/src/ink/random/ParkMiller.hx

except for....

other than the (%modulus seed check) being used (i guess this is needed for Javascript, since it's untyped..) , I wonder why the reference implementation has a -1 in return (this.next() - 1) / 2147483646; but there's no -1 for the haxe version i'm using.

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

No branches or pull requests

2 participants