Skip to content

Commit

Permalink
Merge pull request #60773 from timothyqiu/rand-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored May 5, 2022
2 parents d662d0f + 84cc0c9 commit c3065e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/gdscript/doc_classes/@GDScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -804,10 +804,11 @@
<argument index="0" name="from" type="float" />
<argument index="1" name="to" type="float" />
<description>
Random range, any floating point value between [code]from[/code] and [code]to[/code].
Returns a random floating point value between [code]from[/code] and [code]to[/code] (both endpoints inclusive).
[codeblock]
prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263
[/codeblock]
[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code].
</description>
</method>
<method name="rand_seed">
Expand Down

0 comments on commit c3065e2

Please sign in to comment.