Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


rol

Returns the result of rotating the bits of an int left by bits n.
Read time 2 minutesLast updated 4 days ago

Definition

rol(int, int)

Returns the result of rotating the bits of an int left by bits n.
public static int rol(int x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

intThe rotated value.

rol(int2, int)

Returns the componentwise result of rotating the bits of an int2 left by bits n.
public static int2 rol(int2 x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

int2The componentwise rotated value.

rol(int3, int)

Returns the componentwise result of rotating the bits of an int3 left by bits n.
public static int3 rol(int3 x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

int3The componentwise rotated value.

rol(int4, int)

Returns the componentwise result of rotating the bits of an int4 left by bits n.
public static int4 rol(int4 x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

int4The componentwise rotated value.

rol(uint, int)

Returns the result of rotating the bits of a uint left by bits n.
public static uint rol(uint x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

uintThe rotated value.

rol(uint2, int)

Returns the componentwise result of rotating the bits of a uint2 left by bits n.
public static uint2 rol(uint2 x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

uint2The componentwise rotated value.

rol(uint3, int)

Returns the componentwise result of rotating the bits of a uint3 left by bits n.
public static uint3 rol(uint3 x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

uint3The componentwise rotated value.

rol(uint4, int)

Returns the componentwise result of rotating the bits of a uint4 left by bits n.
public static uint4 rol(uint4 x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

uint4The componentwise rotated value.

rol(long, int)

Returns the result of rotating the bits of a long left by bits n.
public static long rol(long x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

longThe rotated value.

rol(ulong, int)

Returns the result of rotating the bits of a ulong left by bits n.
public static ulong rol(ulong x, int n)

Parameters

Value to rotate.

Number of bits to rotate.

Returns

Type

Description

ulongThe rotated value.