summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorpablotato <pabtatoramos@gmail.com>2017-10-13 01:15:45 +0200
committerRémi Verschelde <rverschelde@gmail.com>2017-11-20 23:34:40 +0100
commit054a2ac579c4893f46b680b1cb0d2460aa3d9140 (patch)
tree8787f924a0eaad0d5924d14e55bbdcb7314ee2e7 /doc/classes
parentfb801d4964fae52e3807e28f2cc5fcd940ce1700 (diff)
Add cartesian to polar conversion functions
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GDScript.xml22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 49ec412ba0..15ada7fdfa 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -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>
@@ -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>