summaryrefslogtreecommitdiff
path: root/doc/classes/@GDScript.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/@GDScript.xml')
-rw-r--r--doc/classes/@GDScript.xml39
1 files changed, 28 insertions, 11 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 349daae6d9..601b1385ae 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -127,7 +127,7 @@
<description>
Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
[codeblock]
- a = atan(0,-1) # a is 3.141593
+ a = atan(0, -1) # a is 3.141593
[/codeblock]
</description>
</method>
@@ -175,7 +175,7 @@
# a is 'A'
a = char(65)
# a is 'a'
- a = char(65+32)
+ a = char(65 + 32)
[/codeblock]
</description>
</method>
@@ -230,7 +230,7 @@
Returns the cosine of angle [code]s[/code] in radians.
[codeblock]
# prints 1 and -1
- print(cos(PI*2))
+ print(cos(PI * 2))
print(cos(PI))
[/codeblock]
</description>
@@ -415,6 +415,21 @@
<return type="Array">
</return>
<description>
+ Returns an array of dictionaries representing the current call stack.
+ [codeblock]
+ func _ready():
+ foo()
+
+ func foo():
+ bar()
+
+ func bar():
+ print(get_stack())
+ [/codeblock]
+ would print
+ [codeblock]
+ [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}]
+ [/codeblock]
</description>
</method>
<method name="hash">
@@ -488,7 +503,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns True/False whether [code]s[/code] is an infinity value (either positive infinity or negative infinity).
+ Returns whether [code]s[/code] is an infinity value (either positive infinity or negative infinity).
</description>
</method>
<method name="is_instance_valid">
@@ -497,6 +512,7 @@
<argument index="0" name="instance" type="Object">
</argument>
<description>
+ Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory).
</description>
</method>
<method name="is_nan">
@@ -505,7 +521,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns True/False whether [code]s[/code] is a NaN (Not-A-Number) value.
+ Returns whether [code]s[/code] is a NaN (Not-A-Number) value.
</description>
</method>
<method name="len">
@@ -584,7 +600,7 @@
<description>
Returns the maximum of two values.
[codeblock]
- max(1,2) # returns 2
+ max(1, 2) # returns 2
max(-3.99, -4) # returns -3.99
[/codeblock]
</description>
@@ -599,7 +615,7 @@
<description>
Returns the minimum of two values.
[codeblock]
- min(1,2) # returns 1
+ min(1, 2) # returns 1
min(-3.99, -4) # returns -4
[/codeblock]
</description>
@@ -657,7 +673,7 @@
<description>
Returns the result of [code]x[/code] raised to the power of [code]y[/code].
[codeblock]
- pow(2,5) # returns 32
+ pow(2, 5) # returns 32
[/codeblock]
</description>
</method>
@@ -681,8 +697,8 @@
<description>
Converts one or more arguments to strings in the best way possible and prints them to the console.
[codeblock]
- a = [1,2,3]
- print("a","b",a) # prints ab[1, 2, 3]
+ a = [1, 2, 3]
+ print("a", "b", a) # prints ab[1, 2, 3]
[/codeblock]
</description>
</method>
@@ -690,6 +706,7 @@
<return type="void">
</return>
<description>
+ Like [method print], but prints only when used in debug mode.
</description>
</method>
<method name="print_stack">
@@ -1009,7 +1026,7 @@
<description>
Returns the tangent of angle [code]s[/code] in radians.
[codeblock]
- tan( deg2rad(45) ) # returns 1
+ tan(deg2rad(45)) # returns 1
[/codeblock]
</description>
</method>