mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current 3.4 branch (716e4e0c2)
This commit is contained in:
@@ -1158,12 +1158,14 @@ Converts an angle expressed in radians to degrees.
|
||||
|
||||
- :ref:`float<class_float>` **rand_range** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)**
|
||||
|
||||
Random range, any floating point value between ``from`` and ``to``.
|
||||
Returns a random floating point value between ``from`` and ``to`` (both endpoints inclusive).
|
||||
|
||||
::
|
||||
|
||||
prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263
|
||||
|
||||
**Note:** This is equivalent to ``randf() * (to - from) + from``.
|
||||
|
||||
----
|
||||
|
||||
.. _class_@GDScript_method_rand_seed:
|
||||
|
||||
Reference in New Issue
Block a user