# smoothstep

> Returns a smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) [xMin, xMax].

## Definition

* **Type:** Method
* **Namespace:** [Unity.Mathematics](/engine/6000.7/script-reference/unity/mathematics.md)
* **Assembly:** UnityEngine.MathematicsModule

## smoothstep(float, float, float)

Returns a smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) \[xMin, xMax].

```csharp
public static float smoothstep(float xMin, float xMax, float x)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The minimum range of the x parameter.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The maximum range of the x parameter.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The value to be interpolated.

### Returns

| Type                                                          | Description                                  |
| ------------------------------------------------------------- | -------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | Returns a value camped to the range \[0, 1]. |

## smoothstep(float2, float2, float2)

Returns a componentwise smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) \[xMin, xMax].

```csharp
public static float2 smoothstep(float2 xMin, float2 xMax, float2 x)
```

### Parameters

**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The minimum range of the x parameter.**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The maximum range of the x parameter.**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The value to be interpolated.

### Returns

| Type                                                                  | Description                                           |
| --------------------------------------------------------------------- | ----------------------------------------------------- |
| [float2](/engine/6000.7/script-reference/unity/mathematics/float2.md) | Returns component values camped to the range \[0, 1]. |

## smoothstep(float3, float3, float3)

Returns a componentwise smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) \[xMin, xMax].

```csharp
public static float3 smoothstep(float3 xMin, float3 xMax, float3 x)
```

### Parameters

**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The minimum range of the x parameter.**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The maximum range of the x parameter.**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The value to be interpolated.

### Returns

| Type                                                                  | Description                                           |
| --------------------------------------------------------------------- | ----------------------------------------------------- |
| [float3](/engine/6000.7/script-reference/unity/mathematics/float3.md) | Returns component values camped to the range \[0, 1]. |

## smoothstep(float4, float4, float4)

Returns a componentwise smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) \[xMin, xMax].

```csharp
public static float4 smoothstep(float4 xMin, float4 xMax, float4 x)
```

### Parameters

**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The minimum range of the x parameter.**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The maximum range of the x parameter.**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The value to be interpolated.

### Returns

| Type                                                                  | Description                                           |
| --------------------------------------------------------------------- | ----------------------------------------------------- |
| [float4](/engine/6000.7/script-reference/unity/mathematics/float4.md) | Returns component values camped to the range \[0, 1]. |

## smoothstep(double, double, double)

Returns a smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) \[xMin, xMax].

```csharp
public static double smoothstep(double xMin, double xMax, double x)
```

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The minimum range of the x parameter.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The maximum range of the x parameter.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The value to be interpolated.

### Returns

| Type                                                           | Description                                  |
| -------------------------------------------------------------- | -------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | Returns a value camped to the range \[0, 1]. |

## smoothstep(double2, double2, double2)

Returns a componentwise smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) \[xMin, xMax].

```csharp
public static double2 smoothstep(double2 xMin, double2 xMax, double2 x)
```

### Parameters

**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The minimum range of the x parameter.**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The maximum range of the x parameter.**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The value to be interpolated.

### Returns

| Type                                                                    | Description                                           |
| ----------------------------------------------------------------------- | ----------------------------------------------------- |
| [double2](/engine/6000.7/script-reference/unity/mathematics/double2.md) | Returns component values camped to the range \[0, 1]. |

## smoothstep(double3, double3, double3)

Returns a componentwise smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) \[xMin, xMax].

```csharp
public static double3 smoothstep(double3 xMin, double3 xMax, double3 x)
```

### Parameters

**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The minimum range of the x parameter.**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The maximum range of the x parameter.**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The value to be interpolated.

### Returns

| Type                                                                    | Description                                           |
| ----------------------------------------------------------------------- | ----------------------------------------------------- |
| [double3](/engine/6000.7/script-reference/unity/mathematics/double3.md) | Returns component values camped to the range \[0, 1]. |

## smoothstep(double4, double4, double4)

Returns a componentwise smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) \[xMin, xMax].

```csharp
public static double4 smoothstep(double4 xMin, double4 xMax, double4 x)
```

### Parameters

**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The minimum range of the x parameter.**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The maximum range of the x parameter.**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The value to be interpolated.

### Returns

| Type                                                                    | Description                                           |
| ----------------------------------------------------------------------- | ----------------------------------------------------- |
| [double4](/engine/6000.7/script-reference/unity/mathematics/double4.md) | Returns component values camped to the range \[0, 1]. |
