Commit 91f9166
authored
Random:NextNumber() clarifications (#920)
## Changes
<!-- Please summarize your 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().
<!-- Please link to any applicable information (forum posts, bug
reports, etc.). -->
[Found out about this in a hard way. Would like this post to be deleted
due to me being embarassed by
it](https://devforum.roblox.com/t/random-nextnumber-should-never-return-zero/3270962)
## Checks
By submitting your pull request for review, you agree to the following:
- [X] 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.
- [X] 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.
- [X] To the best of my knowledge, all proposed changes are accurate.1 parent f3c6051 commit 91f9166
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
0 commit comments