From 02ed79f7f7de99bc7dd2622fd44d17d658843026 Mon Sep 17 00:00:00 2001 From: Thomas Karcher Date: Thu, 29 Aug 2019 14:03:18 +0200 Subject: Updated description for "stepify" Mentioned the possibility to use stepify as a rounding function; +code examples --- modules/gdscript/doc_classes/@GDScript.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/gdscript/doc_classes') diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index ad47323613..605a999d6a 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -1115,7 +1115,11 @@ - Snaps float value [code]s[/code] to a given [code]step[/code]. + Snaps float value [code]s[/code] to a given [code]step[/code]. This can also be used to round a floating point number to an arbitrary number of decimals. + [codeblock] + stepify(100, 32) # Returns 96 + stepify(3.14159, 0.01) # Returns 3.14 + [/codeblock] -- cgit v1.2.3