# int4

> Returns a int4 vector constructed from four int values.

## Definition

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

## int4(int, int, int, int)

Returns a int4 vector constructed from four int values.

```csharp
public static int4 int4(int x, int y, int z, int w)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's x component will be set to this value.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's y component will be set to this value.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's z component will be set to this value.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's w component will be set to this value.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | int4 constructed from arguments. |

## int4(int, int, int2)

Returns a int4 vector constructed from two int values and an int2 vector.

```csharp
public static int4 int4(int x, int y, int2 zw)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's x component will be set to this value.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's y component will be set to this value.**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): The constructed vector's zw components will be set to this value.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | int4 constructed from arguments. |

## int4(int, int2, int)

Returns a int4 vector constructed from an int value, an int2 vector and an int value.

```csharp
public static int4 int4(int x, int2 yz, int w)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's x component will be set to this value.**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): The constructed vector's yz components will be set to this value.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's w component will be set to this value.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | int4 constructed from arguments. |

## int4(int, int3)

Returns a int4 vector constructed from an int value and an int3 vector.

```csharp
public static int4 int4(int x, int3 yzw)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's x component will be set to this value.**** (\[int3]\(/engine/6000.6/script-reference/unity/mathematics/int3)): The constructed vector's yzw components will be set to this value.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | int4 constructed from arguments. |

## int4(int2, int, int)

Returns a int4 vector constructed from an int2 vector and two int values.

```csharp
public static int4 int4(int2 xy, int z, int w)
```

### Parameters

**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): The constructed vector's xy components will be set to this value.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's z component will be set to this value.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's w component will be set to this value.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | int4 constructed from arguments. |

## int4(int2, int2)

Returns a int4 vector constructed from two int2 vectors.

```csharp
public static int4 int4(int2 xy, int2 zw)
```

### Parameters

**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): The constructed vector's xy components will be set to this value.**** (\[int2]\(/engine/6000.6/script-reference/unity/mathematics/int2)): The constructed vector's zw components will be set to this value.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | int4 constructed from arguments. |

## int4(int3, int)

Returns a int4 vector constructed from an int3 vector and an int value.

```csharp
public static int4 int4(int3 xyz, int w)
```

### Parameters

**** (\[int3]\(/engine/6000.6/script-reference/unity/mathematics/int3)): The constructed vector's xyz components will be set to this value.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The constructed vector's w component will be set to this value.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | int4 constructed from arguments. |

## int4(int4)

Returns a int4 vector constructed from an int4 vector.

```csharp
public static int4 int4(int4 xyzw)
```

### Parameters

**** (\[int4]\(/engine/6000.6/script-reference/unity/mathematics/int4)): The constructed vector's xyzw components will be set to this value.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | int4 constructed from arguments. |

## int4(int)

Returns a int4 vector constructed from a single int value by assigning it to every component.

```csharp
public static int4 int4(int v)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): int to convert to int4

### Returns

| Type                                                              | Description      |
| ----------------------------------------------------------------- | ---------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | Converted value. |

## int4(bool)

Returns a int4 vector constructed from a single bool value by converting it to int and assigning it to every component.

```csharp
public static int4 int4(bool v)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): bool to convert to int4

### Returns

| Type                                                              | Description      |
| ----------------------------------------------------------------- | ---------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | Converted value. |

## int4(bool4)

Return a int4 vector constructed from a bool4 vector by componentwise conversion.

```csharp
public static int4 int4(bool4 v)
```

### Parameters

**** (\[bool4]\(/engine/6000.6/script-reference/unity/mathematics/bool4)): bool4 to convert to int4

### Returns

| Type                                                              | Description      |
| ----------------------------------------------------------------- | ---------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | Converted value. |

## int4(uint)

Returns a int4 vector constructed from a single uint value by converting it to int and assigning it to every component.

```csharp
public static int4 int4(uint v)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): uint to convert to int4

### Returns

| Type                                                              | Description      |
| ----------------------------------------------------------------- | ---------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | Converted value. |

## int4(uint4)

Return a int4 vector constructed from a uint4 vector by componentwise conversion.

```csharp
public static int4 int4(uint4 v)
```

### Parameters

**** (\[uint4]\(/engine/6000.6/script-reference/unity/mathematics/uint4)): uint4 to convert to int4

### Returns

| Type                                                              | Description      |
| ----------------------------------------------------------------- | ---------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | Converted value. |

## int4(float)

Returns a int4 vector constructed from a single float value by converting it to int and assigning it to every component.

```csharp
public static int4 int4(float v)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): float to convert to int4

### Returns

| Type                                                              | Description      |
| ----------------------------------------------------------------- | ---------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | Converted value. |

## int4(float4)

Return a int4 vector constructed from a float4 vector by componentwise conversion.

```csharp
public static int4 int4(float4 v)
```

### Parameters

**** (\[float4]\(/engine/6000.6/script-reference/unity/mathematics/float4)): float4 to convert to int4

### Returns

| Type                                                              | Description      |
| ----------------------------------------------------------------- | ---------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | Converted value. |

## int4(double)

Returns a int4 vector constructed from a single double value by converting it to int and assigning it to every component.

```csharp
public static int4 int4(double v)
```

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): double to convert to int4

### Returns

| Type                                                              | Description      |
| ----------------------------------------------------------------- | ---------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | Converted value. |

## int4(double4)

Return a int4 vector constructed from a double4 vector by componentwise conversion.

```csharp
public static int4 int4(double4 v)
```

### Parameters

**** (\[double4]\(/engine/6000.6/script-reference/unity/mathematics/double4)): double4 to convert to int4

### Returns

| Type                                                              | Description      |
| ----------------------------------------------------------------- | ---------------- |
| [int4](/engine/6000.6/script-reference/unity/mathematics/int4.md) | Converted value. |
