diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-02-22 12:38:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 12:38:47 +0100 |
commit | 8107cbd66e1db45a28a8fcd1869320e13a4c741d (patch) | |
tree | e397ecbe83b6435912536f155205870062d1ce71 | |
parent | 29f0ab030357f2b5f42170f987b7a2514d0996f0 (diff) | |
parent | 892060fa477480398aeba0241cd0c661f1b74632 (diff) |
Merge pull request #45934 from angad-k/fix-smoothstep-function-documentation
fix minor issue in smooth step function's documentation
-rw-r--r-- | doc/classes/@GlobalScope.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index e5bcc773fe..3ca7e0716b 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -935,7 +935,7 @@ <description> Returns the result of smoothly interpolating the value of [code]x[/code] between [code]0[/code] and [code]1[/code], based on the where [code]x[/code] lies with respect to the edges [code]from[/code] and [code]to[/code]. The return value is [code]0[/code] if [code]x <= from[/code], and [code]1[/code] if [code]x >= to[/code]. If [code]x[/code] lies between [code]from[/code] and [code]to[/code], the returned value follows an S-shaped curve that maps [code]x[/code] between [code]0[/code] and [code]1[/code]. - This S-shaped curve is the cubic Hermite interpolator, given by [code]f(x) = 3*x^2 - 2*x^3[/code]. + This S-shaped curve is the cubic Hermite interpolator, given by [code]f(y) = 3*y^2 - 2*y^3[/code] where [code]y = (x-from) / (to-from)[/code]. [codeblock] smoothstep(0, 2, -5.0) # Returns 0.0 smoothstep(0, 2, 0.5) # Returns 0.15625 |