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

Random:NextNumber() clarifications #920

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

idontyboi
Copy link
Contributor

@idontyboi idontyboi commented Nov 23, 2024

Changes

math.random() explicitly mentions that exactly zero can be returned by reading it with basic number knowledge. However, Random:NextNumber() requires developers to know numerical range notation to determine that NextNumber can return exactly zero.

Apply the math.random() standard to Random:NextNumber().

Found out about this in a hard way. Would like this post to be deleted due to me being embarassed by it

Checks

By submitting your pull request for review, you agree to the following:

  • This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses.
  • I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses.
  • To the best of my knowledge, all proposed changes are accurate.

Found this out using the hard way.
In-line with the rest of the document.
@idontyboi idontyboi requested a review from a team as a code owner November 23, 2024 19:10
@github-actions github-actions bot added the engine reference Changes the Engine API Reference documentation label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine reference Changes the Engine API Reference documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant