summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChaosus <chaosus89@gmail.com>2019-03-19 14:39:43 +0300
committerChaosus <chaosus89@gmail.com>2019-04-07 14:11:26 +0300
commit514a3fb96a6ad97eb9488cacba7143566cb17d27 (patch)
tree0c8e73449cf64330212c2ced522939753f719f03 /doc
parentdf7d3708c5b535c3696943322a14ec19a175e30c (diff)
Added smoothstep built-in function
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GDScript.xml18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 7b4b3e43ba..5b4664f01a 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -972,6 +972,24 @@
[/codeblock]
</description>
</method>
+ <method name="smoothstep">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="weight" type="float">
+ </argument>
+ <description>
+ Returns a number smoothly interpolated between the [code]from[/code] and [code]to[/code], based on the [code]weight[/code]. Similar to [method lerp], but interpolates faster at the beginning and slower at the end.
+ [codeblock]
+ smooth_step(0, 2, 0.5) # returns 0.15
+ smooth_step(0, 2, 1.0) # returns 0.5
+ smooth_step(0, 2, 2.0) # returns 1.0
+ [/codeblock]
+ </description>
+ </method>
<method name="sqrt">
<return type="float">
</return>