You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that there is no corresponding rand_range function for integers; the existing "rand_range" function returns a floating point value. This seems to me to be a bit of an oversight. Naming also is inconsistent with the existing randf/randi functions.
What would be nice is to rename the existing function to randf_rage (to cover floating point), and to provide an integer version (randi_range).
The text was updated successfully, but these errors were encountered:
This is a duplicate/subset of #7199, which is more recent but also got more recent activity, so closing in favour of that one. If some information described here is missing from the other issue, feel free to link it/copy it there.
Operating system or device - Godot version:
OS is N/A, issue is valid as of at least Godot 2.1.
Issue description (what happened, and what was expected):
Per http://docs.godotengine.org/en/latest/classes/[email protected]#class-gdscript-rand-range
Note that there is no corresponding rand_range function for integers; the existing "rand_range" function returns a floating point value. This seems to me to be a bit of an oversight. Naming also is inconsistent with the existing randf/randi functions.
What would be nice is to rename the existing function to randf_rage (to cover floating point), and to provide an integer version (randi_range).
The text was updated successfully, but these errors were encountered: