1
0
Fork 0

Improve documentation of `rand_range`

(cherry picked from commit 84cc0c9c47)
This commit is contained in:
Haoyu Qiu 2022-05-05 09:45:58 +08:00 committed by Rémi Verschelde
parent 49282b59d6
commit dda6066c33
1 changed files with 2 additions and 1 deletions

View File

@ -790,10 +790,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">