# Clamp

> Clamps the Vector2Int to the bounds given by min and max.

## Definition

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

## Clamp(Vector2Int, Vector2Int)

Clamps the `Vector2Int` to the bounds given by `min` and `max`.

```csharp
public void Clamp(Vector2Int min, Vector2Int max)
```

### Parameters

**** (\[Vector2Int]\(/engine/6000.6/script-reference/unityengine/vector2int)): The minimum bound.**** (\[Vector2Int]\(/engine/6000.6/script-reference/unityengine/vector2int)): The maximum bound.

## Clamp(Vector2Int, Vector2Int)

Clamps the `Vector2Int` to the bounds given by `min` and `max`.

```csharp
public void Clamp(in Vector2Int min, in Vector2Int max)
```

### Parameters

**** (\[Vector2Int]\(/engine/6000.6/script-reference/unityengine/vector2int)): The minimum bound.**** (\[Vector2Int]\(/engine/6000.6/script-reference/unityengine/vector2int)): The maximum bound.
