-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Your Godot version:
4.5.1
Issue description:
The document for the RandomNumberGenerator class is missing some pieces of information regarding what happens when float randf_range(from: float, to: float) and int randi_range(from: int, to: int) are called with from > to.
For randi_range, the documentation of the GobalScope functions explains that the parameters are swapped when such a situation occurs. It seems to be the same for methods from the class RandomNumberGenerator, but the documentation does not mention it.
It is not necessarily an obvious behavior. One could, for instance, expect and exception. So I think the documentation of these two methods should mention this behavior.
URL to the documentation page (if already existing):
https://docs.godotengine.org/en/latest/classes/class_randomnumbergenerator.html