# select

> Returns trueValue if test is true, falseValue otherwise.

## Definition

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

## select(int, int, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static int select(int falseValue, int trueValue, bool test)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Value to use if test is false.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                       | Description                                                            |
| ---------------------------------------------------------- | ---------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The selection between falseValue and trueValue according to bool test. |

## select(int2, int2, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static int2 select(int2 falseValue, int2 trueValue, bool test)
```

### Parameters

**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): Value to use if test is false.**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                              | Description                                                            |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [int2](/engine/6000.6/script-reference/unity/mathematics/int2.md) | The selection between falseValue and trueValue according to bool test. |

## select(int3, int3, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static int3 select(int3 falseValue, int3 trueValue, bool test)
```

### Parameters

**** (\[int3]\(/engine/6000.6/script-reference/unity/mathematics/int3)): Value to use if test is false.**** (\[int3]\(/engine/6000.6/script-reference/unity/mathematics/int3)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                              | Description                                                            |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [int3](/engine/6000.6/script-reference/unity/mathematics/int3.md) | The selection between falseValue and trueValue according to bool test. |

## select(int4, int4, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static int4 select(int4 falseValue, int4 trueValue, bool test)
```

### Parameters

**** (\[int4]\(/engine/6000.6/script-reference/unity/mathematics/int4)): Value to use if test is false.**** (\[int4]\(/engine/6000.6/script-reference/unity/mathematics/int4)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                              | Description                                                            |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | The selection between falseValue and trueValue according to bool test. |

## select(int2, int2, bool2)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static int2 select(int2 falseValue, int2 trueValue, bool2 test)
```

### Parameters

**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): Values to use if test is false.**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): Values to use if test is true.**** (\[bool2]\(/engine/6000.6/script-reference/unity/mathematics/bool2)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                              | Description                                                                                    |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [int2](/engine/6000.6/script-reference/unity/mathematics/int2.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(int3, int3, bool3)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static int3 select(int3 falseValue, int3 trueValue, bool3 test)
```

### Parameters

**** (\[int3]\(/engine/6000.6/script-reference/unity/mathematics/int3)): Values to use if test is false.**** (\[int3]\(/engine/6000.6/script-reference/unity/mathematics/int3)): Values to use if test is true.**** (\[bool3]\(/engine/6000.6/script-reference/unity/mathematics/bool3)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                              | Description                                                                                    |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [int3](/engine/6000.6/script-reference/unity/mathematics/int3.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(int4, int4, bool4)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static int4 select(int4 falseValue, int4 trueValue, bool4 test)
```

### Parameters

**** (\[int4]\(/engine/6000.6/script-reference/unity/mathematics/int4)): Values to use if test is false.**** (\[int4]\(/engine/6000.6/script-reference/unity/mathematics/int4)): Values to use if test is true.**** (\[bool4]\(/engine/6000.6/script-reference/unity/mathematics/bool4)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                              | Description                                                                                    |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(uint, uint, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static uint select(uint falseValue, uint trueValue, bool test)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Value to use if test is false.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                         | Description                                                            |
| ------------------------------------------------------------ | ---------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | The selection between falseValue and trueValue according to bool test. |

## select(uint2, uint2, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static uint2 select(uint2 falseValue, uint2 trueValue, bool test)
```

### Parameters

**** (\[uint2]\(/engine/6000.6/script-reference/unity/mathematics/uint2)): Value to use if test is false.**** (\[uint2]\(/engine/6000.6/script-reference/unity/mathematics/uint2)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                                | Description                                                            |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [uint2](/engine/6000.6/script-reference/unity/mathematics/uint2.md) | The selection between falseValue and trueValue according to bool test. |

## select(uint3, uint3, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static uint3 select(uint3 falseValue, uint3 trueValue, bool test)
```

### Parameters

**** (\[uint3]\(/engine/6000.6/script-reference/unity/mathematics/uint3)): Value to use if test is false.**** (\[uint3]\(/engine/6000.6/script-reference/unity/mathematics/uint3)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                                | Description                                                            |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [uint3](/engine/6000.6/script-reference/unity/mathematics/uint3.md) | The selection between falseValue and trueValue according to bool test. |

## select(uint4, uint4, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static uint4 select(uint4 falseValue, uint4 trueValue, bool test)
```

### Parameters

**** (\[uint4]\(/engine/6000.6/script-reference/unity/mathematics/uint4)): Value to use if test is false.**** (\[uint4]\(/engine/6000.6/script-reference/unity/mathematics/uint4)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                                | Description                                                            |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [uint4](/engine/6000.6/script-reference/unity/mathematics/uint4.md) | The selection between falseValue and trueValue according to bool test. |

## select(uint2, uint2, bool2)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static uint2 select(uint2 falseValue, uint2 trueValue, bool2 test)
```

### Parameters

**** (\[uint2]\(/engine/6000.6/script-reference/unity/mathematics/uint2)): Values to use if test is false.**** (\[uint2]\(/engine/6000.6/script-reference/unity/mathematics/uint2)): Values to use if test is true.**** (\[bool2]\(/engine/6000.6/script-reference/unity/mathematics/bool2)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                                | Description                                                                                    |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [uint2](/engine/6000.6/script-reference/unity/mathematics/uint2.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(uint3, uint3, bool3)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static uint3 select(uint3 falseValue, uint3 trueValue, bool3 test)
```

### Parameters

**** (\[uint3]\(/engine/6000.6/script-reference/unity/mathematics/uint3)): Values to use if test is false.**** (\[uint3]\(/engine/6000.6/script-reference/unity/mathematics/uint3)): Values to use if test is true.**** (\[bool3]\(/engine/6000.6/script-reference/unity/mathematics/bool3)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                                | Description                                                                                    |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [uint3](/engine/6000.6/script-reference/unity/mathematics/uint3.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(uint4, uint4, bool4)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static uint4 select(uint4 falseValue, uint4 trueValue, bool4 test)
```

### Parameters

**** (\[uint4]\(/engine/6000.6/script-reference/unity/mathematics/uint4)): Values to use if test is false.**** (\[uint4]\(/engine/6000.6/script-reference/unity/mathematics/uint4)): Values to use if test is true.**** (\[bool4]\(/engine/6000.6/script-reference/unity/mathematics/bool4)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                                | Description                                                                                    |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [uint4](/engine/6000.6/script-reference/unity/mathematics/uint4.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(long, long, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static long select(long falseValue, long trueValue, bool test)
```

### Parameters

**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): Value to use if test is false.**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                        | Description                                                            |
| ----------------------------------------------------------- | ---------------------------------------------------------------------- |
| [long](https://learn.microsoft.com/dotnet/api/system.int64) | The selection between falseValue and trueValue according to bool test. |

## select(ulong, ulong, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static ulong select(ulong falseValue, ulong trueValue, bool test)
```

### Parameters

**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): Value to use if test is false.**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                          | Description                                                            |
| ------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) | The selection between falseValue and trueValue according to bool test. |

## select(float, float, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static float select(float falseValue, float trueValue, bool test)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Value to use if test is false.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                          | Description                                                            |
| ------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The selection between falseValue and trueValue according to bool test. |

## select(float2, float2, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static float2 select(float2 falseValue, float2 trueValue, bool test)
```

### Parameters

**** (\[float2]\(/engine/6000.6/script-reference/unity/mathematics/float2)): Value to use if test is false.**** (\[float2]\(/engine/6000.6/script-reference/unity/mathematics/float2)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                                  | Description                                                            |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [float2](/engine/6000.6/script-reference/unity/mathematics/float2.md) | The selection between falseValue and trueValue according to bool test. |

## select(float3, float3, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static float3 select(float3 falseValue, float3 trueValue, bool test)
```

### Parameters

**** (\[float3]\(/engine/6000.6/script-reference/unity/mathematics/float3)): Value to use if test is false.**** (\[float3]\(/engine/6000.6/script-reference/unity/mathematics/float3)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                                  | Description                                                            |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [float3](/engine/6000.6/script-reference/unity/mathematics/float3.md) | The selection between falseValue and trueValue according to bool test. |

## select(float4, float4, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static float4 select(float4 falseValue, float4 trueValue, bool test)
```

### Parameters

**** (\[float4]\(/engine/6000.6/script-reference/unity/mathematics/float4)): Value to use if test is false.**** (\[float4]\(/engine/6000.6/script-reference/unity/mathematics/float4)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                                  | Description                                                            |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [float4](/engine/6000.6/script-reference/unity/mathematics/float4.md) | The selection between falseValue and trueValue according to bool test. |

## select(float2, float2, bool2)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static float2 select(float2 falseValue, float2 trueValue, bool2 test)
```

### Parameters

**** (\[float2]\(/engine/6000.6/script-reference/unity/mathematics/float2)): Values to use if test is false.**** (\[float2]\(/engine/6000.6/script-reference/unity/mathematics/float2)): Values to use if test is true.**** (\[bool2]\(/engine/6000.6/script-reference/unity/mathematics/bool2)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                                  | Description                                                                                    |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [float2](/engine/6000.6/script-reference/unity/mathematics/float2.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(float3, float3, bool3)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static float3 select(float3 falseValue, float3 trueValue, bool3 test)
```

### Parameters

**** (\[float3]\(/engine/6000.6/script-reference/unity/mathematics/float3)): Values to use if test is false.**** (\[float3]\(/engine/6000.6/script-reference/unity/mathematics/float3)): Values to use if test is true.**** (\[bool3]\(/engine/6000.6/script-reference/unity/mathematics/bool3)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                                  | Description                                                                                    |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [float3](/engine/6000.6/script-reference/unity/mathematics/float3.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(float4, float4, bool4)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static float4 select(float4 falseValue, float4 trueValue, bool4 test)
```

### Parameters

**** (\[float4]\(/engine/6000.6/script-reference/unity/mathematics/float4)): Values to use if test is false.**** (\[float4]\(/engine/6000.6/script-reference/unity/mathematics/float4)): Values to use if test is true.**** (\[bool4]\(/engine/6000.6/script-reference/unity/mathematics/bool4)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                                  | Description                                                                                    |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [float4](/engine/6000.6/script-reference/unity/mathematics/float4.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(double, double, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static double select(double falseValue, double trueValue, bool test)
```

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): Value to use if test is false.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                           | Description                                                            |
| -------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | The selection between falseValue and trueValue according to bool test. |

## select(double2, double2, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static double2 select(double2 falseValue, double2 trueValue, bool test)
```

### Parameters

**** (\[double2]\(/engine/6000.6/script-reference/unity/mathematics/double2)): Value to use if test is false.**** (\[double2]\(/engine/6000.6/script-reference/unity/mathematics/double2)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                                    | Description                                                            |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [double2](/engine/6000.6/script-reference/unity/mathematics/double2.md) | The selection between falseValue and trueValue according to bool test. |

## select(double3, double3, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static double3 select(double3 falseValue, double3 trueValue, bool test)
```

### Parameters

**** (\[double3]\(/engine/6000.6/script-reference/unity/mathematics/double3)): Value to use if test is false.**** (\[double3]\(/engine/6000.6/script-reference/unity/mathematics/double3)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                                    | Description                                                            |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [double3](/engine/6000.6/script-reference/unity/mathematics/double3.md) | The selection between falseValue and trueValue according to bool test. |

## select(double4, double4, bool)

Returns trueValue if test is true, falseValue otherwise.

```csharp
public static double4 select(double4 falseValue, double4 trueValue, bool test)
```

### Parameters

**** (\[double4]\(/engine/6000.6/script-reference/unity/mathematics/double4)): Value to use if test is false.**** (\[double4]\(/engine/6000.6/script-reference/unity/mathematics/double4)): Value to use if test is true.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Bool value to choose between falseValue and trueValue.

### Returns

| Type                                                                    | Description                                                            |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [double4](/engine/6000.6/script-reference/unity/mathematics/double4.md) | The selection between falseValue and trueValue according to bool test. |

## select(double2, double2, bool2)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static double2 select(double2 falseValue, double2 trueValue, bool2 test)
```

### Parameters

**** (\[double2]\(/engine/6000.6/script-reference/unity/mathematics/double2)): Values to use if test is false.**** (\[double2]\(/engine/6000.6/script-reference/unity/mathematics/double2)): Values to use if test is true.**** (\[bool2]\(/engine/6000.6/script-reference/unity/mathematics/bool2)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                                    | Description                                                                                    |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [double2](/engine/6000.6/script-reference/unity/mathematics/double2.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(double3, double3, bool3)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static double3 select(double3 falseValue, double3 trueValue, bool3 test)
```

### Parameters

**** (\[double3]\(/engine/6000.6/script-reference/unity/mathematics/double3)): Values to use if test is false.**** (\[double3]\(/engine/6000.6/script-reference/unity/mathematics/double3)): Values to use if test is true.**** (\[bool3]\(/engine/6000.6/script-reference/unity/mathematics/bool3)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                                    | Description                                                                                    |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [double3](/engine/6000.6/script-reference/unity/mathematics/double3.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |

## select(double4, double4, bool4)

Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected.

```csharp
public static double4 select(double4 falseValue, double4 trueValue, bool4 test)
```

### Parameters

**** (\[double4]\(/engine/6000.6/script-reference/unity/mathematics/double4)): Values to use if test is false.**** (\[double4]\(/engine/6000.6/script-reference/unity/mathematics/double4)): Values to use if test is true.**** (\[bool4]\(/engine/6000.6/script-reference/unity/mathematics/bool4)): Selection mask to choose between falseValue and trueValue.

### Returns

| Type                                                                    | Description                                                                                    |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [double4](/engine/6000.6/script-reference/unity/mathematics/double4.md) | The componentwise selection between falseValue and trueValue according to selection mask test. |
