# remap

> Returns the result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd].

## Definition

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

## remap(float, float, float, float, float)

Returns the result of a non-clamping linear remapping of a value x from source range \[srcStart, srcEnd] to the destination range \[dstStart, dstEnd].

```csharp
public static float remap(float srcStart, float srcEnd, float dstStart, float dstEnd, float x)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The start point of the source range \[srcStart, srcEnd].**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The end point of the source range \[srcStart, srcEnd].**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The start point of the destination range \[dstStart, dstEnd].**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The end point of the destination range \[dstStart, dstEnd].**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The value to remap from the source to destination range.

### Returns

| Type                                                          | Description                                                          |
| ------------------------------------------------------------- | -------------------------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The remap of input x from the source range to the destination range. |

## remap(float2, float2, float2, float2, float2)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range \[srcStart, srcEnd] to the destination range \[dstStart, dstEnd].

```csharp
public static float2 remap(float2 srcStart, float2 srcEnd, float2 dstStart, float2 dstEnd, float2 x)
```

### Parameters

**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The start point of the source range \[srcStart, srcEnd].**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The end point of the source range \[srcStart, srcEnd].**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The start point of the destination range \[dstStart, dstEnd].**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The end point of the destination range \[dstStart, dstEnd].**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The value to remap from the source to destination range.

### Returns

| Type                                                                  | Description                                                                        |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [float2](/engine/6000.7/script-reference/unity/mathematics/float2.md) | The componentwise remap of input x from the source range to the destination range. |

## remap(float3, float3, float3, float3, float3)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range \[srcStart, srcEnd] to the destination range \[dstStart, dstEnd].

```csharp
public static float3 remap(float3 srcStart, float3 srcEnd, float3 dstStart, float3 dstEnd, float3 x)
```

### Parameters

**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The start point of the source range \[srcStart, srcEnd].**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The end point of the source range \[srcStart, srcEnd].**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The start point of the destination range \[dstStart, dstEnd].**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The end point of the destination range \[dstStart, dstEnd].**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The value to remap from the source to destination range.

### Returns

| Type                                                                  | Description                                                                        |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [float3](/engine/6000.7/script-reference/unity/mathematics/float3.md) | The componentwise remap of input x from the source range to the destination range. |

## remap(float4, float4, float4, float4, float4)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range \[srcStart, srcEnd] to the destination range \[dstStart, dstEnd].

```csharp
public static float4 remap(float4 srcStart, float4 srcEnd, float4 dstStart, float4 dstEnd, float4 x)
```

### Parameters

**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The start point of the source range \[srcStart, srcEnd].**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The end point of the source range \[srcStart, srcEnd].**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The start point of the destination range \[dstStart, dstEnd].**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The end point of the destination range \[dstStart, dstEnd].**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The value to remap from the source to destination range.

### Returns

| Type                                                                  | Description                                                                        |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [float4](/engine/6000.7/script-reference/unity/mathematics/float4.md) | The componentwise remap of input x from the source range to the destination range. |

## remap(double, double, double, double, double)

Returns the result of a non-clamping linear remapping of a value x from source range \[srcStart, srcEnd] to the destination range \[dstStart, dstEnd].

```csharp
public static double remap(double srcStart, double srcEnd, double dstStart, double dstEnd, double x)
```

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The start point of the source range \[srcStart, srcEnd].**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The end point of the source range \[srcStart, srcEnd].**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The start point of the destination range \[dstStart, dstEnd].**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The end point of the destination range \[dstStart, dstEnd].**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The value to remap from the source to destination range.

### Returns

| Type                                                           | Description                                                          |
| -------------------------------------------------------------- | -------------------------------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | The remap of input x from the source range to the destination range. |

## remap(double2, double2, double2, double2, double2)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range \[srcStart, srcEnd] to the destination range \[dstStart, dstEnd].

```csharp
public static double2 remap(double2 srcStart, double2 srcEnd, double2 dstStart, double2 dstEnd, double2 x)
```

### Parameters

**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The start point of the source range \[srcStart, srcEnd].**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The end point of the source range \[srcStart, srcEnd].**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The start point of the destination range \[dstStart, dstEnd].**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The end point of the destination range \[dstStart, dstEnd].**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The value to remap from the source to destination range.

### Returns

| Type                                                                    | Description                                                                        |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [double2](/engine/6000.7/script-reference/unity/mathematics/double2.md) | The componentwise remap of input x from the source range to the destination range. |

## remap(double3, double3, double3, double3, double3)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range \[srcStart, srcEnd] to the destination range \[dstStart, dstEnd].

```csharp
public static double3 remap(double3 srcStart, double3 srcEnd, double3 dstStart, double3 dstEnd, double3 x)
```

### Parameters

**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The start point of the source range \[srcStart, srcEnd].**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The end point of the source range \[srcStart, srcEnd].**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The start point of the destination range \[dstStart, dstEnd].**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The end point of the destination range \[dstStart, dstEnd].**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The value to remap from the source to destination range.

### Returns

| Type                                                                    | Description                                                                        |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [double3](/engine/6000.7/script-reference/unity/mathematics/double3.md) | The componentwise remap of input x from the source range to the destination range. |

## remap(double4, double4, double4, double4, double4)

Returns the componentwise result of a non-clamping linear remapping of a value x from source range \[srcStart, srcEnd] to the destination range \[dstStart, dstEnd].

```csharp
public static double4 remap(double4 srcStart, double4 srcEnd, double4 dstStart, double4 dstEnd, double4 x)
```

### Parameters

**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The start point of the source range \[srcStart, srcEnd].**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The end point of the source range \[srcStart, srcEnd].**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The start point of the destination range \[dstStart, dstEnd].**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The end point of the destination range \[dstStart, dstEnd].**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The value to remap from the source to destination range.

### Returns

| Type                                                                    | Description                                                                        |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [double4](/engine/6000.7/script-reference/unity/mathematics/double4.md) | The componentwise remap of input x from the source range to the destination range. |
