summaryrefslogtreecommitdiff
path: root/modules/gdscript/doc_classes
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/doc_classes')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml23
-rw-r--r--modules/gdscript/doc_classes/GDScript.xml2
2 files changed, 19 insertions, 6 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index f65f2a8935..1d0567dd8d 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -322,6 +322,7 @@
<description>
The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]s[/code] and returns it.
[b]e[/b] has an approximate value of 2.71828.
+ For exponents to other bases use the method [method pow].
[codeblock]
a = exp(2) # Approximately 7.39
[/codeblock]
@@ -589,10 +590,10 @@
extends Sprite
var elapsed = 0.0
func _process(delta):
- var min_angle = deg2rad(0.0)
- var max_angle = deg2rad(90.0)
- rotation = lerp_angle(min_angle, max_angle, elapsed)
- elapsed += delta
+ var min_angle = deg2rad(0.0)
+ var max_angle = deg2rad(90.0)
+ rotation = lerp_angle(min_angle, max_angle, elapsed)
+ elapsed += delta
[/codeblock]
</description>
</method>
@@ -693,6 +694,14 @@
[/codeblock]
</description>
</method>
+ <method name="ord">
+ <return type="int">
+ </return>
+ <argument index="0" name="char" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="parse_json">
<return type="Variant">
</return>
@@ -1114,7 +1123,11 @@
<argument index="1" name="step" type="float">
</argument>
<description>
- 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]
</description>
</method>
<method name="str" qualifiers="vararg">
diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml
index d606a41fab..6f43361914 100644
--- a/modules/gdscript/doc_classes/GDScript.xml
+++ b/modules/gdscript/doc_classes/GDScript.xml
@@ -19,7 +19,7 @@
</description>
</method>
<method name="new" qualifiers="vararg">
- <return type="Object">
+ <return type="Variant">
</return>
<description>
Returns a new instance of the script.