# int2

> Constructs a int2 vector from two int values.

## Definition

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

## int2(int, int)

Constructs a int2 vector from two int values.

```csharp
public int2(int x, int y)
```

### 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(int2)

Constructs a int2 vector from an int2 vector.

```csharp
public int2(int2 xy)
```

### Parameters

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

## int2(int)

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

```csharp
public int2(int v)
```

### Parameters

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

## int2(bool)

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

```csharp
public int2(bool v)
```

### Parameters

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

## int2(bool2)

Constructs a int2 vector from a bool2 vector by componentwise conversion.

```csharp
public int2(bool2 v)
```

### Parameters

**** (\[bool2]\(/engine/6000.7/script-reference/unity/mathematics/bool2)): bool2 to convert to int2

## int2(uint)

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

```csharp
public int2(uint v)
```

### Parameters

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

## int2(uint2)

Constructs a int2 vector from a uint2 vector by componentwise conversion.

```csharp
public int2(uint2 v)
```

### Parameters

**** (\[uint2]\(/engine/6000.7/script-reference/unity/mathematics/uint2)): uint2 to convert to int2

## int2(float)

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

```csharp
public int2(float v)
```

### Parameters

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

## int2(float2)

Constructs a int2 vector from a float2 vector by componentwise conversion.

```csharp
public int2(float2 v)
```

### Parameters

**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): float2 to convert to int2

## int2(double)

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

```csharp
public int2(double v)
```

### Parameters

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

## int2(double2)

Constructs a int2 vector from a double2 vector by componentwise conversion.

```csharp
public int2(double2 v)
```

### Parameters

**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): double2 to convert to int2
