# explicit operator int2

> Explicitly converts a single bool value to a int2 vector by converting it to int and assigning it to every component.

## Definition

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

## explicit operator int2(int)

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

```csharp
public static explicit operator int2(bool v)
```

### Parameters

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

### Returns

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

## explicit operator int2(int)

Explicitly converts a bool2 vector to a int2 vector by componentwise conversion.

```csharp
public static explicit operator int2(bool2 v)
```

### Parameters

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

### Returns

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

## explicit operator int2(int)

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

```csharp
public static explicit operator int2(uint v)
```

### Parameters

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

### Returns

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

## explicit operator int2(int)

Explicitly converts a uint2 vector to a int2 vector by componentwise conversion.

```csharp
public static explicit operator int2(uint2 v)
```

### Parameters

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

### Returns

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

## explicit operator int2(int)

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

```csharp
public static explicit operator int2(float v)
```

### Parameters

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

### Returns

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

## explicit operator int2(int)

Explicitly converts a float2 vector to a int2 vector by componentwise conversion.

```csharp
public static explicit operator int2(float2 v)
```

### Parameters

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

### Returns

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

## explicit operator int2(int)

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

```csharp
public static explicit operator int2(double v)
```

### Parameters

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

### Returns

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

## explicit operator int2(int)

Explicitly converts a double2 vector to a int2 vector by componentwise conversion.

```csharp
public static explicit operator int2(double2 v)
```

### Parameters

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

### Returns

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