# int4

> Constructs a int4 vector from four int values.

## Definition

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

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

Constructs a int4 vector from four int values.

```csharp
public 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.

## int4(int, int, int2)

Constructs a int4 vector from two int values and an int2 vector.

```csharp
public 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.5/script-reference/unity/mathematics/int2)): The constructed vector's zw components will be set to this value.

## int4(int, int2, int)

Constructs a int4 vector from an int value, an int2 vector and an int value.

```csharp
public 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.5/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.

## int4(int, int3)

Constructs a int4 vector from an int value and an int3 vector.

```csharp
public 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.5/script-reference/unity/mathematics/int3)): The constructed vector's yzw components will be set to this value.

## int4(int2, int, int)

Constructs a int4 vector from an int2 vector and two int values.

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

### Parameters

**** (\[int2]\(/engine/6000.5/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.

## int4(int2, int2)

Constructs a int4 vector from two int2 vectors.

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

### Parameters

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

## int4(int3, int)

Constructs a int4 vector from an int3 vector and an int value.

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

### Parameters

**** (\[int3]\(/engine/6000.5/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.

## int4(int4)

Constructs a int4 vector from an int4 vector.

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

### Parameters

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

## int4(int)

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

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

### Parameters

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

## int4(bool)

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

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

### Parameters

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

## int4(bool4)

Constructs a int4 vector from a bool4 vector by componentwise conversion.

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

### Parameters

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

## int4(uint)

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

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

### Parameters

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

## int4(uint4)

Constructs a int4 vector from a uint4 vector by componentwise conversion.

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

### Parameters

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

## int4(float)

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

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

### Parameters

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

## int4(float4)

Constructs a int4 vector from a float4 vector by componentwise conversion.

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

### Parameters

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

## int4(double)

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

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

### Parameters

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

## int4(double4)

Constructs a int4 vector from a double4 vector by componentwise conversion.

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

### Parameters

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