# Clamp

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

## Definition

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

## Clamp(Vector3Int, Vector3Int)

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

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

### Parameters

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

## Clamp(Vector3Int, Vector3Int)

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

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

### Parameters

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