sm.util.smoothstep
Performs smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1. This is useful in cases where a threshold function with a smooth transition is desired.
Kind: Function
Environments: Game, Terrain
Game
sm.util.smoothstep( edge0, edge1, x )
Parameters:
| Name | Type | Description |
|---|---|---|
edge0 |
number | The value of the lower edge of the Hermite function. |
edge1 |
number | The value of the upper edge of the Hermite function. |
x |
number | The source value for interpolation. |
Returns:
| Type | Description |
|---|---|
| number | The value. |
Terrain
sm.util.smoothstep( edge0, edge1, x )
Open the full Terrain reference
Parameters:
| Name | Type | Description |
|---|---|---|
edge0 |
number | The value of the lower edge of the Hermite function. |
edge1 |
number | The value of the upper edge of the Hermite function. |
x |
number | The source value for interpolation. |
Returns:
| Type | Description |
|---|---|
| number | The value. |