# ror

> Returns the result of rotating the bits of an int right by bits n.

## Definition

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

## ror(int, int)

Returns the result of rotating the bits of an int right by bits n.

```csharp
public static int ror(int x, int n)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                       | Description        |
| ---------------------------------------------------------- | ------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The rotated value. |

## ror(int2, int)

Returns the componentwise result of rotating the bits of an int2 right by bits n.

```csharp
public static int2 ror(int2 x, int n)
```

### Parameters

**** (\[int2]\(/engine/6000.5/script-reference/unity/mathematics/int2)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int2](/engine/6000.5/script-reference/unity/mathematics/int2.md) | The componentwise rotated value. |

## ror(int3, int)

Returns the componentwise result of rotating the bits of an int3 right by bits n.

```csharp
public static int3 ror(int3 x, int n)
```

### Parameters

**** (\[int3]\(/engine/6000.5/script-reference/unity/mathematics/int3)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int3](/engine/6000.5/script-reference/unity/mathematics/int3.md) | The componentwise rotated value. |

## ror(int4, int)

Returns the componentwise result of rotating the bits of an int4 right by bits n.

```csharp
public static int4 ror(int4 x, int n)
```

### Parameters

**** (\[int4]\(/engine/6000.5/script-reference/unity/mathematics/int4)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                              | Description                      |
| ----------------------------------------------------------------- | -------------------------------- |
| [int4](/engine/6000.5/script-reference/unity/mathematics/int4.md) | The componentwise rotated value. |

## ror(uint, int)

Returns the result of rotating the bits of a uint right by bits n.

```csharp
public static uint ror(uint x, int n)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                         | Description        |
| ------------------------------------------------------------ | ------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | The rotated value. |

## ror(uint2, int)

Returns the componentwise result of rotating the bits of a uint2 right by bits n.

```csharp
public static uint2 ror(uint2 x, int n)
```

### Parameters

**** (\[uint2]\(/engine/6000.5/script-reference/unity/mathematics/uint2)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                                | Description                      |
| ------------------------------------------------------------------- | -------------------------------- |
| [uint2](/engine/6000.5/script-reference/unity/mathematics/uint2.md) | The componentwise rotated value. |

## ror(uint3, int)

Returns the componentwise result of rotating the bits of a uint3 right by bits n.

```csharp
public static uint3 ror(uint3 x, int n)
```

### Parameters

**** (\[uint3]\(/engine/6000.5/script-reference/unity/mathematics/uint3)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                                | Description                      |
| ------------------------------------------------------------------- | -------------------------------- |
| [uint3](/engine/6000.5/script-reference/unity/mathematics/uint3.md) | The componentwise rotated value. |

## ror(uint4, int)

Returns the componentwise result of rotating the bits of a uint4 right by bits n.

```csharp
public static uint4 ror(uint4 x, int n)
```

### Parameters

**** (\[uint4]\(/engine/6000.5/script-reference/unity/mathematics/uint4)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                                | Description                      |
| ------------------------------------------------------------------- | -------------------------------- |
| [uint4](/engine/6000.5/script-reference/unity/mathematics/uint4.md) | The componentwise rotated value. |

## ror(long, int)

Returns the result of rotating the bits of a long right by bits n.

```csharp
public static long ror(long x, int n)
```

### Parameters

**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                        | Description        |
| ----------------------------------------------------------- | ------------------ |
| [long](https://learn.microsoft.com/dotnet/api/system.int64) | The rotated value. |

## ror(ulong, int)

Returns the result of rotating the bits of a ulong right by bits n.

```csharp
public static ulong ror(ulong x, int n)
```

### Parameters

**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): Value to rotate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of bits to rotate.

### Returns

| Type                                                          | Description        |
| ------------------------------------------------------------- | ------------------ |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) | The rotated value. |
