summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-12-03 09:45:28 +0100
committerGitHub <noreply@github.com>2019-12-03 09:45:28 +0100
commit54af9cd470bfef6817b28a66b3bc542c2e48d95f (patch)
treeea250ae4fa2d3443159102b03c5e3d43dffa592c
parentc3609eb2115f239e36ddeef1a7ab40a7216ab7f8 (diff)
parent1fcdeaee39c175cdc7d4217666306850d2126b50 (diff)
Merge pull request #34074 from Calinou/doc-floor-int
Mention that `int()` can be used as an alternative to `floor()`
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 949663c5ea..2a8453116e 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -336,11 +336,12 @@
<description>
Rounds [code]s[/code] to the closest smaller integer and returns it.
[codeblock]
- # a is 2
+ # a is 2.0
a = floor(2.99)
- # a is -3
+ # a is -3.0
a = floor(-2.99)
[/codeblock]
+ [b]Note:[/b] This method returns a float. If you need an integer, you can use [code]int(s)[/code] directly.
</description>
</method>
<method name="fmod">