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 a better random number generator #13

Open
programagor opened this issue Sep 21, 2018 · 0 comments
Open

Use a better random number generator #13

programagor opened this issue Sep 21, 2018 · 0 comments

Comments

@programagor
Copy link
Owner

Use of rand() is discouraged, because the quality of the produced distribution has some undesirable characteristics. I haven't noticed any effects of that in the images, but better play it safe.

rainbrot/src/worker.c

Lines 66 to 71 in baffa37

do
{
U1=rand();
}
while(U1==0);
U2=rand();

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

1 participant