# lerp

> Returns the result of linearly interpolating from start to end using the interpolation parameter t.

## Definition

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

## lerp(float, float, float)

Returns the result of linearly interpolating from start to end using the interpolation parameter t.

```csharp
public static float lerp(float start, float end, float t)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The start point, corresponding to the interpolation parameter value of 0.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The end point, corresponding to the interpolation parameter value of 1.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                          | Description                          |
| ------------------------------------------------------------- | ------------------------------------ |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The interpolation from start to end. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(float2, float2, float)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

```csharp
public static float2 lerp(float2 start, float2 end, float t)
```

### Parameters

**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The start point, corresponding to the interpolation parameter value of 0.**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The end point, corresponding to the interpolation parameter value of 1.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                  | Description                                  |
| --------------------------------------------------------------------- | -------------------------------------------- |
| [float2](/engine/6000.7/script-reference/unity/mathematics/float2.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(float3, float3, float)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

```csharp
public static float3 lerp(float3 start, float3 end, float t)
```

### Parameters

**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The start point, corresponding to the interpolation parameter value of 0.**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The end point, corresponding to the interpolation parameter value of 1.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                  | Description                                  |
| --------------------------------------------------------------------- | -------------------------------------------- |
| [float3](/engine/6000.7/script-reference/unity/mathematics/float3.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(float4, float4, float)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

```csharp
public static float4 lerp(float4 start, float4 end, float t)
```

### Parameters

**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The start point, corresponding to the interpolation parameter value of 0.**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The end point, corresponding to the interpolation parameter value of 1.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                  | Description                                  |
| --------------------------------------------------------------------- | -------------------------------------------- |
| [float4](/engine/6000.7/script-reference/unity/mathematics/float4.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(float2, float2, float2)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

```csharp
public static float2 lerp(float2 start, float2 end, float2 t)
```

### Parameters

**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The start point, corresponding to the interpolation parameter value of 0.**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The end point, corresponding to the interpolation parameter value of 1.**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                  | Description                                  |
| --------------------------------------------------------------------- | -------------------------------------------- |
| [float2](/engine/6000.7/script-reference/unity/mathematics/float2.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(float3, float3, float3)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

```csharp
public static float3 lerp(float3 start, float3 end, float3 t)
```

### Parameters

**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The start point, corresponding to the interpolation parameter value of 0.**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The end point, corresponding to the interpolation parameter value of 1.**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                  | Description                                  |
| --------------------------------------------------------------------- | -------------------------------------------- |
| [float3](/engine/6000.7/script-reference/unity/mathematics/float3.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(float4, float4, float4)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

```csharp
public static float4 lerp(float4 start, float4 end, float4 t)
```

### Parameters

**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The start point, corresponding to the interpolation parameter value of 0.**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The end point, corresponding to the interpolation parameter value of 1.**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                  | Description                                  |
| --------------------------------------------------------------------- | -------------------------------------------- |
| [float4](/engine/6000.7/script-reference/unity/mathematics/float4.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(double, double, double)

Returns the result of linearly interpolating from x to y using the interpolation parameter t.

```csharp
public static double lerp(double start, double end, double t)
```

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The start point, corresponding to the interpolation parameter value of 0.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The end point, corresponding to the interpolation parameter value of 1.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                           | Description                    |
| -------------------------------------------------------------- | ------------------------------ |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | The interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(double2, double2, double)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

```csharp
public static double2 lerp(double2 start, double2 end, double t)
```

### Parameters

**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The start point, corresponding to the interpolation parameter value of 0.**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The end point, corresponding to the interpolation parameter value of 1.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                    | Description                                  |
| ----------------------------------------------------------------------- | -------------------------------------------- |
| [double2](/engine/6000.7/script-reference/unity/mathematics/double2.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(double3, double3, double)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

```csharp
public static double3 lerp(double3 start, double3 end, double t)
```

### Parameters

**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The start point, corresponding to the interpolation parameter value of 0.**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The end point, corresponding to the interpolation parameter value of 1.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                    | Description                                  |
| ----------------------------------------------------------------------- | -------------------------------------------- |
| [double3](/engine/6000.7/script-reference/unity/mathematics/double3.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(double4, double4, double)

Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t.

```csharp
public static double4 lerp(double4 start, double4 end, double t)
```

### Parameters

**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The start point, corresponding to the interpolation parameter value of 0.**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The end point, corresponding to the interpolation parameter value of 1.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                    | Description                                  |
| ----------------------------------------------------------------------- | -------------------------------------------- |
| [double4](/engine/6000.7/script-reference/unity/mathematics/double4.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(double2, double2, double2)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

```csharp
public static double2 lerp(double2 start, double2 end, double2 t)
```

### Parameters

**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The start point, corresponding to the interpolation parameter value of 0.**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The end point, corresponding to the interpolation parameter value of 1.**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                    | Description                                  |
| ----------------------------------------------------------------------- | -------------------------------------------- |
| [double2](/engine/6000.7/script-reference/unity/mathematics/double2.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(double3, double3, double3)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

```csharp
public static double3 lerp(double3 start, double3 end, double3 t)
```

### Parameters

**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The start point, corresponding to the interpolation parameter value of 0.**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The end point, corresponding to the interpolation parameter value of 1.**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                    | Description                                  |
| ----------------------------------------------------------------------- | -------------------------------------------- |
| [double3](/engine/6000.7/script-reference/unity/mathematics/double3.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.

## lerp(double4, double4, double4)

Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t.

```csharp
public static double4 lerp(double4 start, double4 end, double4 t)
```

### Parameters

**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The start point, corresponding to the interpolation parameter value of 0.**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The end point, corresponding to the interpolation parameter value of 1.**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The interpolation parameter. May be a value outside the interval \[0, 1].

### Returns

| Type                                                                    | Description                                  |
| ----------------------------------------------------------------------- | -------------------------------------------- |
| [double4](/engine/6000.7/script-reference/unity/mathematics/double4.md) | The componentwise interpolation from x to y. |

### Remarks

If the interpolation parameter is not in the range \[0, 1], then this function extrapolates.
