summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-08 10:03:42 +0200
committerGitHub <noreply@github.com>2019-04-08 10:03:42 +0200
commitd211aff777ec338a5f57cece1c7bf76120d0622d (patch)
treec7d6a922eb7e7a5dd3995c366848f39c82338220 /doc
parent5a64c679cfc5463afd4a703b1c6e437d894b22b1 (diff)
parent514a3fb96a6ad97eb9488cacba7143566cb17d27 (diff)
Merge pull request #27231 from Chaosus/smoothstep
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 df52f8503a..17ca11490a 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -975,6 +975,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>