Table of Contents

Method RotateLeft

Namespace
Zyl.VectorTraits.Numerics
Assembly
VectorTraits.dll

RotateLeft(uint, int)

Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 instruction ROL.

[CLSCompliant(false)]
public static uint RotateLeft(uint value, int offset)

Parameters

value uint

The value to rotate.

offset int

The number of bits to rotate by. Any value outside the range [0..31] is treated as congruent mod 32.

Returns

uint

The rotated value.

RotateLeft(ulong, int)

Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 instruction ROL.

[CLSCompliant(false)]
public static ulong RotateLeft(ulong value, int offset)

Parameters

value ulong

The value to rotate.

offset int

The number of bits to rotate by. Any value outside the range [0..63] is treated as congruent mod 64.

Returns

ulong

The rotated value.

RotateLeft(ExUInt128, int)

[CLSCompliant(false)]
public static ExUInt128 RotateLeft(ExUInt128 value, int offset)

Parameters

value ExUInt128
offset int

Returns

ExUInt128

RotateLeft(UInt128, int)

[CLSCompliant(false)]
public static UInt128 RotateLeft(UInt128 value, int offset)

Parameters

value UInt128
offset int

Returns

UInt128

RotateLeft(nuint, int)

Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 instruction ROL.

[CLSCompliant(false)]
public static nuint RotateLeft(nuint value, int offset)

Parameters

value nuint

The value to rotate.

offset int

The number of bits to rotate by. Any value outside the range [0..31] is treated as congruent mod 32 on a 32-bit process, and any value outside the range [0..63] is treated as congruent mod 64 on a 64-bit process.

Returns

nuint

The rotated value.