# FloorToInt

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

## Definition

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

## FloorToInt(Vector2)

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

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

### Parameters

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

### Returns

| Type                                                                    | Description                            |
| ----------------------------------------------------------------------- | -------------------------------------- |
| [Vector2Int](/engine/6000.6/script-reference/unityengine/vector2int.md) | The converted Vector2 as a Vector2Int. |

### Remarks

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

## FloorToInt(Vector2)

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

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

### Parameters

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

### Returns

| Type                                                                    | Description                            |
| ----------------------------------------------------------------------- | -------------------------------------- |
| [Vector2Int](/engine/6000.6/script-reference/unityengine/vector2int.md) | The converted Vector2 as a Vector2Int. |

### Remarks

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