From 1fcdeaee39c175cdc7d4217666306850d2126b50 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 3 Dec 2019 08:30:49 +0100 Subject: Mention that `int()` can be used as an alternative to `floor()` --- modules/gdscript/doc_classes/@GDScript.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/gdscript/doc_classes') 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 @@ 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. -- cgit v1.2.3