Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

math.rol

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static int rol(int x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

int The rotated value.

Description

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


Declaration

public static int2 rol(int2 x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

int2 The componentwise rotated value.

Description

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


Declaration

public static int3 rol(int3 x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

int3 The componentwise rotated value.

Description

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


Declaration

public static int4 rol(int4 x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

int4 The componentwise rotated value.

Description

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


Declaration

public static uint rol(uint x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

uint The rotated value.

Description

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


Declaration

public static uint2 rol(uint2 x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

uint2 The componentwise rotated value.

Description

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


Declaration

public static uint3 rol(uint3 x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

uint3 The componentwise rotated value.

Description

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


Declaration

public static uint4 rol(uint4 x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

uint4 The componentwise rotated value.

Description

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


Declaration

public static long rol(long x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

long The rotated value.

Description

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


Declaration

public static ulong rol(ulong x, int n);

Parameters

Parameter Description
x Value to rotate.
n Number of bits to rotate.

Returns

ulong The rotated value.

Description

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