diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-04-25 17:20:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 17:20:45 +0200 |
commit | faddbcfc0c5b1d2281b58f671c9cbf4e187eb97f (patch) | |
tree | 9c3d6acdf8226aa4c624884a54b732e57014b7ff | |
parent | baa0b4fdec95900e50ff215914fa04d7f44f20c7 (diff) | |
parent | 540fca147dad86d9c347dc332adebb1b7fe14868 (diff) |
Merge pull request #60394 from Chaosus/fix_range_doc
-rw-r--r-- | modules/gdscript/doc_classes/@GDScript.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index d9fab01dce..d0926d317b 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -186,7 +186,7 @@ <description> Returns an array with the given range. Range can be 1 argument [code]N[/code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], [code]final - 1[/code]) or three arguments ([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). Returns an empty array if the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]). Returns an array with the given range. [code]range()[/code] can have 1 argument N ([code]0[/code] to [code]N - 1[/code]), two arguments ([code]initial[/code], [code]final - 1[/code]) or three arguments ([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). [code]increment[/code] can be negative. If [code]increment[/code] is negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, the initial value must be greater than the final value for the loop to run. - [code]range()(/code] converts all arguments to [int] before processing. + [code]range()[/code] converts all arguments to [int] before processing. [codeblock] print(range(4)) print(range(2, 5)) |