diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-12-03 08:30:49 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-12-03 08:43:24 +0100 |
commit | 1fcdeaee39c175cdc7d4217666306850d2126b50 (patch) | |
tree | 69eadcdda9fa52cbf1e85947e2edbaec8868c142 /modules/gdscript/doc_classes | |
parent | 10bae7c05b18b73b39fbaf5c118780512832f0b3 (diff) |
Mention that `int()` can be used as an alternative to `floor()`
Diffstat (limited to 'modules/gdscript/doc_classes')
-rw-r--r-- | modules/gdscript/doc_classes/@GDScript.xml | 5 |
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"> |