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.xml43
1 files changed, 34 insertions, 9 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 9c1d9a1aa2..bee2cdf387 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@GDScript" category="Core" version="3.0.alpha.custom_build">
+<class name="@GDScript" category="Core" version="3.0-beta">
<brief_description>
Built-in GDScript functions.
</brief_description>
@@ -138,6 +138,17 @@
Decodes a byte array back to a value.
</description>
</method>
+ <method name="cartesian2polar">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle).
+ </description>
+ </method>
<method name="ceil">
<return type="float">
</return>
@@ -196,7 +207,7 @@
<argument index="1" name="type" type="int">
</argument>
<description>
- Converts from a type to another in the best way possible. The [code]type[/code] parameter uses the enum TYPE_* in [@Global Scope].
+ Converts from a type to another in the best way possible. The [code]type[/code] parameter uses the enum TYPE_* in [@GlobalScope].
[codeblock]
a = Vector2(1, 0)
# prints 1
@@ -604,6 +615,17 @@
[/codeblock]
</description>
</method>
+ <method name="polar2cartesian">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="r" type="float">
+ </argument>
+ <argument index="1" name="th" type="float">
+ </argument>
+ <description>
+ Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (x and y axis).
+ </description>
+ </method>
<method name="pow">
<return type="float">
</return>
@@ -984,7 +1006,7 @@
<argument index="0" name="what" type="Variant">
</argument>
<description>
- Returns the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope].
+ Returns the internal type of the given Variant object, using the TYPE_* enum in [@GlobalScope].
[codeblock]
p = parse_json('["a", "b", "c"]')
if typeof(p) == TYPE_ARRAY:
@@ -1103,26 +1125,29 @@
</description>
</method>
<method name="yield">
- <return type="GDFunctionState">
+ <return type="GDScriptFunctionState">
</return>
<argument index="0" name="object" type="Object">
</argument>
<argument index="1" name="signal" type="String">
</argument>
<description>
- Stops the function execution and returns the current state. Call [method GDFunctionState.resume] on the state to resume execution. This invalidates the state.
+ Stops the function execution and returns the current state. Call [method GDScriptFunctionState.resume] on the state to resume execution. This invalidates the state.
Returns anything that was passed to the resume function call. If passed an object and a signal, the execution is resumed when the object's signal is emitted.
</description>
</method>
</methods>
<constants>
- <constant name="PI" value="3.141593" enum="">
- Constant that represents how many times the diameter of a circumference fits around its perimeter.
+ <constant name="PI" value="3.141593">
+ Constant that represents how many times the diameter of a circle fits around its perimeter.
+ </constant>
+ <constant name="TAU" value="6.283185">
+ The circle constant, the circumference of the unit circle.
</constant>
- <constant name="INF" value="inf" enum="">
+ <constant name="INF" value="inf">
A positive infinity. (For negative infinity, use -INF).
</constant>
- <constant name="NAN" value="nan" enum="">
+ <constant name="NAN" value="nan">
Macro constant that expands to an expression of type float that represents a NaN.
The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.
</constant>