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

Make max of Random methods inclusive rather than exclusive #8768

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

AdRiley
Copy link
Member

@AdRiley AdRiley commented Jan 15, 2024

Pull Request Description

Closes #8838

Trying to generate 3 random six sided dice rolls

image

feels much more readable than

image

This PR makes the max inclusive for Random.Integer and Random.Date

It also standardises the range names as min and max
And removes end_exclusive option from Date

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@AdRiley AdRiley force-pushed the wip/adr/make-max-of-random-int-inclusive branch from c312254 to 09b4c93 Compare January 23, 2024 13:19
@AdRiley AdRiley added the CI: No changelog needed Do not require a changelog entry for this PR. label Jan 23, 2024
@AdRiley AdRiley marked this pull request as ready for review January 23, 2024 17:15
@AdRiley AdRiley merged commit 23d6fcd into develop Jan 24, 2024
26 of 27 checks passed
@AdRiley AdRiley deleted the wip/adr/make-max-of-random-int-inclusive branch January 24, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Random library functions
4 participants