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

Rewrote random code to improve randomness #2176

Merged
merged 3 commits into from Apr 1, 2022
Merged

Conversation

jwoff78
Copy link
Contributor

@jwoff78 jwoff78 commented Apr 1, 2022

No description provided.

Copy link
Member

@quajak quajak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr! Looks good overall.

}
inext = 0;
inextp = 21;
seed = 1;
}

// TODO: improve this
public static int GenerateGlobalSeed() => RTC.Second;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are changing this code, can you please add some static counter value to the RTC.Second so that if we call it twice in a second the value is not exactly the same.

@quajak quajak merged commit 1ff6d06 into CosmosOS:master Apr 1, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants