# cmax

> Returns the maximum component of an int2 vector.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Mathematics](/engine/6000.7/script-reference/unity/mathematics.md)
* **Assembly:** UnityEngine.MathematicsModule

## cmax(int2)

Returns the maximum component of an int2 vector.

```csharp
public static int cmax(int2 x)
```

### Parameters

**** (\[int2]\(/engine/6000.7/script-reference/unity/mathematics/int2)): The vector to use when computing the maximum component.

### Returns

| Type                                                       | Description                                       |
| ---------------------------------------------------------- | ------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the maximum component of the vector. |

## cmax(int3)

Returns the maximum component of an int3 vector.

```csharp
public static int cmax(int3 x)
```

### Parameters

**** (\[int3]\(/engine/6000.7/script-reference/unity/mathematics/int3)): The vector to use when computing the maximum component.

### Returns

| Type                                                       | Description                                       |
| ---------------------------------------------------------- | ------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the maximum component of the vector. |

## cmax(int4)

Returns the maximum component of an int4 vector.

```csharp
public static int cmax(int4 x)
```

### Parameters

**** (\[int4]\(/engine/6000.7/script-reference/unity/mathematics/int4)): The vector to use when computing the maximum component.

### Returns

| Type                                                       | Description                                       |
| ---------------------------------------------------------- | ------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The value of the maximum component of the vector. |

## cmax(uint2)

Returns the maximum component of a uint2 vector.

```csharp
public static uint cmax(uint2 x)
```

### Parameters

**** (\[uint2]\(/engine/6000.7/script-reference/unity/mathematics/uint2)): The vector to use when computing the maximum component.

### Returns

| Type                                                         | Description                                       |
| ------------------------------------------------------------ | ------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | The value of the maximum component of the vector. |

## cmax(uint3)

Returns the maximum component of a uint3 vector.

```csharp
public static uint cmax(uint3 x)
```

### Parameters

**** (\[uint3]\(/engine/6000.7/script-reference/unity/mathematics/uint3)): The vector to use when computing the maximum component.

### Returns

| Type                                                         | Description                                       |
| ------------------------------------------------------------ | ------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | The value of the maximum component of the vector. |

## cmax(uint4)

Returns the maximum component of a uint4 vector.

```csharp
public static uint cmax(uint4 x)
```

### Parameters

**** (\[uint4]\(/engine/6000.7/script-reference/unity/mathematics/uint4)): The vector to use when computing the maximum component.

### Returns

| Type                                                         | Description                                       |
| ------------------------------------------------------------ | ------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | The value of the maximum component of the vector. |

## cmax(float2)

Returns the maximum component of a float2 vector.

```csharp
public static float cmax(float2 x)
```

### Parameters

**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): The vector to use when computing the maximum component.

### Returns

| Type                                                          | Description                                       |
| ------------------------------------------------------------- | ------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The value of the maximum component of the vector. |

## cmax(float3)

Returns the maximum component of a float3 vector.

```csharp
public static float cmax(float3 x)
```

### Parameters

**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The vector to use when computing the maximum component.

### Returns

| Type                                                          | Description                                       |
| ------------------------------------------------------------- | ------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The value of the maximum component of the vector. |

## cmax(float4)

Returns the maximum component of a float4 vector.

```csharp
public static float cmax(float4 x)
```

### Parameters

**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): The vector to use when computing the maximum component.

### Returns

| Type                                                          | Description                                       |
| ------------------------------------------------------------- | ------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The value of the maximum component of the vector. |

## cmax(double2)

Returns the maximum component of a double2 vector.

```csharp
public static double cmax(double2 x)
```

### Parameters

**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): The vector to use when computing the maximum component.

### Returns

| Type                                                           | Description                                       |
| -------------------------------------------------------------- | ------------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | The value of the maximum component of the vector. |

## cmax(double3)

Returns the maximum component of a double3 vector.

```csharp
public static double cmax(double3 x)
```

### Parameters

**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): The vector to use when computing the maximum component.

### Returns

| Type                                                           | Description                                       |
| -------------------------------------------------------------- | ------------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | The value of the maximum component of the vector. |

## cmax(double4)

Returns the maximum component of a double4 vector.

```csharp
public static double cmax(double4 x)
```

### Parameters

**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): The vector to use when computing the maximum component.

### Returns

| Type                                                           | Description                                       |
| -------------------------------------------------------------- | ------------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | The value of the maximum component of the vector. |
