# 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

``` { .lua .api-signature }
sm.util.smoothstep( edge0, edge1, x )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.util.md#smoothstep)

**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

``` { .lua .api-signature }
sm.util.smoothstep( edge0, edge1, x )
```

[Open the full Terrain reference](../Terrain-Script-Environment/Static-Functions/sm.util.md#smoothstep)

**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. |
