# Max

> Creates a vector that is made from the largest components of two vectors.

## Definition

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

## Max(Vector2Int, Vector2Int)

Creates a vector that is made from the largest components of two vectors.

```csharp
public static Vector2Int Max(Vector2Int lhs, Vector2Int rhs)
```

### Parameters

**** (\[Vector2Int]\(/engine/6000.7/script-reference/unityengine/vector2int)): The first vector to compare.**** (\[Vector2Int]\(/engine/6000.7/script-reference/unityengine/vector2int)): The second vector to compare.

### Returns

| Type                                                                    | Description                                                       |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [Vector2Int](/engine/6000.7/script-reference/unityengine/vector2int.md) | A vector that is made from the largest components of two vectors. |

### Remarks

Additional Resources: [Vector2Int.Min](/engine/6000.7/script-reference/unityengine/vector2int/min.md) function.

## Max(Vector2Int, Vector2Int)

Creates a vector that is made from the largest components of two vectors.

```csharp
public static Vector2Int Max(in Vector2Int lhs, in Vector2Int rhs)
```

### Parameters

**** (\[Vector2Int]\(/engine/6000.7/script-reference/unityengine/vector2int)): The first vector to compare.**** (\[Vector2Int]\(/engine/6000.7/script-reference/unityengine/vector2int)): The second vector to compare.

### Returns

| Type                                                                    | Description                                                       |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [Vector2Int](/engine/6000.7/script-reference/unityengine/vector2int.md) | A vector that is made from the largest components of two vectors. |

### Remarks

Additional Resources: [Vector2Int.Min](/engine/6000.7/script-reference/unityengine/vector2int/min.md) function.
