# lzcnt

> Returns the componentwise number of leading zeros in the binary representations of an int vector.

## Definition

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

## lzcnt(int)

Returns the componentwise number of leading zeros in the binary representations of an int vector.

```csharp
public static int lzcnt(int x)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Input value.

### Returns

| Type                                                       | Description                               |
| ---------------------------------------------------------- | ----------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of leading zeros of the input. |

## lzcnt(int2)

Returns the componentwise number of leading zeros in the binary representations of an int2 vector.

```csharp
public static int2 lzcnt(int2 x)
```

### Parameters

**** (\[int2]\(/engine/6000.7/script-reference/unity/mathematics/int2)): Input value.

### Returns

| Type                                                              | Description                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------- |
| [int2](/engine/6000.7/script-reference/unity/mathematics/int2.md) | The componentwise number of leading zeros of the input. |

## lzcnt(int3)

Returns the componentwise number of leading zeros in the binary representations of an int3 vector.

```csharp
public static int3 lzcnt(int3 x)
```

### Parameters

**** (\[int3]\(/engine/6000.7/script-reference/unity/mathematics/int3)): Input value.

### Returns

| Type                                                              | Description                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------- |
| [int3](/engine/6000.7/script-reference/unity/mathematics/int3.md) | The componentwise number of leading zeros of the input. |

## lzcnt(int4)

Returns the componentwise number of leading zeros in the binary representations of an int4 vector.

```csharp
public static int4 lzcnt(int4 x)
```

### Parameters

**** (\[int4]\(/engine/6000.7/script-reference/unity/mathematics/int4)): Input value.

### Returns

| Type                                                              | Description                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------- |
| [int4](/engine/6000.7/script-reference/unity/mathematics/int4.md) | The componentwise number of leading zeros of the input. |

## lzcnt(uint)

Returns number of leading zeros in the binary representations of a uint value.

```csharp
public static int lzcnt(uint x)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Input value.

### Returns

| Type                                                       | Description                               |
| ---------------------------------------------------------- | ----------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of leading zeros of the input. |

## lzcnt(uint2)

Returns the componentwise number of leading zeros in the binary representations of a uint2 vector.

```csharp
public static int2 lzcnt(uint2 x)
```

### Parameters

**** (\[uint2]\(/engine/6000.7/script-reference/unity/mathematics/uint2)): Input value.

### Returns

| Type                                                              | Description                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------- |
| [int2](/engine/6000.7/script-reference/unity/mathematics/int2.md) | The componentwise number of leading zeros of the input. |

## lzcnt(uint3)

Returns the componentwise number of leading zeros in the binary representations of a uint3 vector.

```csharp
public static int3 lzcnt(uint3 x)
```

### Parameters

**** (\[uint3]\(/engine/6000.7/script-reference/unity/mathematics/uint3)): Input value.

### Returns

| Type                                                              | Description                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------- |
| [int3](/engine/6000.7/script-reference/unity/mathematics/int3.md) | The componentwise number of leading zeros of the input. |

## lzcnt(uint4)

Returns the componentwise number of leading zeros in the binary representations of a uint4 vector.

```csharp
public static int4 lzcnt(uint4 x)
```

### Parameters

**** (\[uint4]\(/engine/6000.7/script-reference/unity/mathematics/uint4)): Input value.

### Returns

| Type                                                              | Description                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------- |
| [int4](/engine/6000.7/script-reference/unity/mathematics/int4.md) | The componentwise number of leading zeros of the input. |

## lzcnt(long)

Returns number of leading zeros in the binary representations of a long value.

```csharp
public static int lzcnt(long x)
```

### Parameters

**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): Input value.

### Returns

| Type                                                       | Description                               |
| ---------------------------------------------------------- | ----------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of leading zeros of the input. |

## lzcnt(ulong)

Returns number of leading zeros in the binary representations of a ulong value.

```csharp
public static int lzcnt(ulong x)
```

### Parameters

**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): Input value.

### Returns

| Type                                                       | Description                               |
| ---------------------------------------------------------- | ----------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of leading zeros of the input. |
