Skip to content

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
@IgnisRBX IgnisRBX merged commit 91f9166 into Roblox:main Nov 25, 2024
3 checks passed
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.

2 participants