Merge pull request #60773 from timothyqiu/rand-doc

This commit is contained in:
Rémi Verschelde 2022-05-05 18:10:14 +02:00 committed by GitHub
commit c3065e2186
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -804,10 +804,11 @@
<argument index="0" name="from" type="float" /> <argument index="0" name="from" type="float" />
<argument index="1" name="to" type="float" /> <argument index="1" name="to" type="float" />
<description> <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] [codeblock]
prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263 prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263
[/codeblock] [/codeblock]
[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code].
</description> </description>
</method> </method>
<method name="rand_seed"> <method name="rand_seed">