Cross-reference GDScript built-in rounding methods to ease discovery
This closes #19315.
(cherry picked from commit 20d0f5bbd7
)
This commit is contained in:
parent
dea530d5ca
commit
afef89014b
|
@ -167,6 +167,7 @@
|
||||||
i = ceil(1.45) # i is 2
|
i = ceil(1.45) # i is 2
|
||||||
i = ceil(1.001) # i is 2
|
i = ceil(1.001) # i is 2
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
|
See also [method floor], [method round], and [method stepify].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="char">
|
<method name="char">
|
||||||
|
@ -347,6 +348,7 @@
|
||||||
# a is -3.0
|
# a is -3.0
|
||||||
a = floor(-2.99)
|
a = floor(-2.99)
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
|
See also [method ceil], [method round], and [method stepify].
|
||||||
[b]Note:[/b] This method returns a float. If you need an integer, you can use [code]int(s)[/code] directly.
|
[b]Note:[/b] This method returns a float. If you need an integer, you can use [code]int(s)[/code] directly.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
@ -1042,6 +1044,7 @@
|
||||||
[codeblock]
|
[codeblock]
|
||||||
round(2.6) # Returns 3
|
round(2.6) # Returns 3
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
|
See also [method floor], [method ceil], and [method stepify].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="seed">
|
<method name="seed">
|
||||||
|
@ -1157,6 +1160,7 @@
|
||||||
stepify(100, 32) # Returns 96
|
stepify(100, 32) # Returns 96
|
||||||
stepify(3.14159, 0.01) # Returns 3.14
|
stepify(3.14159, 0.01) # Returns 3.14
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
|
See also [method ceil], [method floor], and [method round].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="str" qualifiers="vararg">
|
<method name="str" qualifiers="vararg">
|
||||||
|
|
Loading…
Reference in New Issue