# math.smootherstep

Function · category: Math

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/core/math/math.js#L285

```ts
smootherstep(min: number, max: number, x: number): number
```

An improved version of the [math.smoothstep](https://api.playcanvas.com/engine/functions/math.smoothstep.md) function which has zero 1st and 2nd order
derivatives at t=0 and t=1.

See https://en.wikipedia.org/wiki/Smoothstep#Variations for more details.

**Parameters**

- `min` (`number`): The lower bound of the interpolation range.
- `max` (`number`): The upper bound of the interpolation range.
- `x` (`number`): The value to interpolate.

**Returns** `number`: The smoothly interpolated value clamped between zero and one.

**Example**

```ts
math.smootherstep(0, 10, 5); // returns 0.5
```
