# RoundToInt

> Converts a Vector2 to a Vector2Int by doing a Round to each value.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## RoundToInt(Vector2)

Converts a [Vector2](/engine/6000.5/script-reference/unityengine/vector2.md) to a [Vector2Int](/engine/6000.5/script-reference/unityengine/vector2int.md) by doing a Round to each value.

```csharp
public static Vector2Int RoundToInt(Vector2 v)
```

### Parameters

**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): The Vector2 to convert.

### Returns

| Type                                                                    | Description           |
| ----------------------------------------------------------------------- | --------------------- |
| [Vector2Int](/engine/6000.5/script-reference/unityengine/vector2int.md) | A rounded Vector2Int. |

### Remarks

As there is a conversion of float to integer, there is a loss of precision.

## RoundToInt(Vector2)

Converts a [Vector2](/engine/6000.5/script-reference/unityengine/vector2.md) to a [Vector2Int](/engine/6000.5/script-reference/unityengine/vector2int.md) by doing a Round to each value.

```csharp
public static Vector2Int RoundToInt(in Vector2 v)
```

### Parameters

**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): The Vector2 to convert.

### Returns

| Type                                                                    | Description           |
| ----------------------------------------------------------------------- | --------------------- |
| [Vector2Int](/engine/6000.5/script-reference/unityengine/vector2int.md) | A rounded Vector2Int. |

### Remarks

As there is a conversion of float to integer, there is a loss of precision.
