# explicit operator int4

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

## Definition

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

## explicit operator int4(int)

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

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

### Parameters

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

### Returns

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

## explicit operator int4(int)

Explicitly converts a bool4 vector to a int4 vector by componentwise conversion.

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

### Parameters

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

### Returns

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

## explicit operator int4(int)

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

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

### Parameters

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

### Returns

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

## explicit operator int4(int)

Explicitly converts a uint4 vector to a int4 vector by componentwise conversion.

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

### Parameters

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

### Returns

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

## explicit operator int4(int)

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

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

### Parameters

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

### Returns

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

## explicit operator int4(int)

Explicitly converts a float4 vector to a int4 vector by componentwise conversion.

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

### Parameters

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

### Returns

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

## explicit operator int4(int)

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

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

### Parameters

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

### Returns

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

## explicit operator int4(int)

Explicitly converts a double4 vector to a int4 vector by componentwise conversion.

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

### Parameters

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

### Returns

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