-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reclaim shards: trying to prevent error "Empty interval in math.rando…
…m()" in another way
- Loading branch information
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
934c599
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like our problem?
https://stackoverflow.com/questions/20171224/interval-is-empty-lua-math-random-isnt-working-for-large-numbers
Second parameter is larger than integer max value, so wraps around to negative, and is now less than the first parameter.
934c599
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my previous attempt I already capped the min+max to -500 and 500 in lines 29-33