# NextUInt

> Returns a uniformly random uint value in the interval [0, 4294967294].

## Definition

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

## NextUInt()

Returns a uniformly random uint value in the interval \[0, 4294967294].

```csharp
public uint NextUInt()
```

### Returns

| Type                                                         | Description                          |
| ------------------------------------------------------------ | ------------------------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | A uniformly random unsigned integer. |

## NextUInt(uint)

Returns a uniformly random uint value in the interval \[0, max).

```csharp
public uint NextUInt(uint max)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): The maximum value to generate, exclusive.

### Returns

| Type                                                         | Description                                                 |
| ------------------------------------------------------------ | ----------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | A uniformly random unsigned integer in the range \[0, max). |

## NextUInt(uint, uint)

Returns a uniformly random uint value in the interval \[min, max).

```csharp
public uint NextUInt(uint min, uint max)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): The minimum value to generate, inclusive.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): The maximum value to generate, exclusive.

### Returns

| Type                                                         | Description                                                   |
| ------------------------------------------------------------ | ------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | A uniformly random unsigned integer in the range \[min, max). |
