You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Added smoothstep built-in function
(cherry picked from commit 514a3fb96a)
This commit is contained in:
committed by
Hein-Pieter van Braam-Stewart
parent
340bf6e80c
commit
6ab01490f5
@@ -202,7 +202,14 @@
|
||||
<constant name="COLORN" value="62" enum="BuiltinFunc">
|
||||
Return the [Color] with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc.
|
||||
</constant>
|
||||
<constant name="FUNC_MAX" value="63" enum="BuiltinFunc">
|
||||
<constant name="MATH_SMOOTHSTEP" value="63" enum="BuiltinFunc">
|
||||
Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to [code]MATH_LERP[/code], but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula:
|
||||
[codeblock]
|
||||
var t = clamp((weight - from) / (to - from), 0.0, 1.0)
|
||||
return t * t * (3.0 - 2.0 * t)
|
||||
[/codeblock]
|
||||
</constant>
|
||||
<constant name="FUNC_MAX" value="64" enum="BuiltinFunc">
|
||||
The maximum value the [member function] property can have.
|
||||
</constant>
|
||||
</constants>
|
||||
|
||||
Reference in New Issue
Block a user