C# Класс GarrysModLuaShared.bit

The bitwise library contains useful functions for bitwise operations.
Показать файл Открыть проект

Открытые методы

Метод Описание
arshift ( LuaState luaState, double value, double shiftCount ) : double

Returns the arithmetically shifted value.

band ( LuaState luaState, double value ) : double

Returns the bitwise and of all values specified.

bnot ( LuaState luaState, double value ) : double

Returns the bitwise not of the value.

bor ( LuaState luaState, double value ) : double

Returns the bitwise OR of all values specified.

bswap ( LuaState luaState, double value ) : double

Swaps the byte order.

bxor ( LuaState luaState, double value ) : double

Returns the bitwise xor of all values specified.

lshift ( LuaState luaState, double value, double shiftCount ) : double

Returns the left shifted value.

rol ( LuaState luaState, double value, double shiftCount ) : double

Returns the left rotated value.

ror ( LuaState luaState, double value, double shiftCount ) : double

Returns the right rotated value.

rshift ( LuaState luaState, double value, double shiftCount ) : double

Returns the right shifted value.

tobit ( LuaState luaState, double value ) : double

Normalizes the specified value and clamps it in the range of a signed 32bit integer.

tohex ( LuaState luaState, double value, double digits = 8 ) : string

Returns the hexadecimal representation of the number with the specified digits.

Описание методов

arshift() публичный статический Метод

Returns the arithmetically shifted value.
public static arshift ( LuaState luaState, double value, double shiftCount ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be manipulated.
shiftCount double Amount of bits to shift.
Результат double

band() публичный статический Метод

Returns the bitwise and of all values specified.
public static band ( LuaState luaState, double value ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be manipulated.
Результат double

bnot() публичный статический Метод

Returns the bitwise not of the value.
public static bnot ( LuaState luaState, double value ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be inverted.
Результат double

bor() публичный статический Метод

Returns the bitwise OR of all values specified.
public static bor ( LuaState luaState, double value ) : double
luaState LuaState Pointer to lua_State struct.
value double The first value.
Результат double

bswap() публичный статический Метод

Swaps the byte order.
public static bswap ( LuaState luaState, double value ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be byte swapped.
Результат double

bxor() публичный статический Метод

Returns the bitwise xor of all values specified.
public static bxor ( LuaState luaState, double value ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be manipulated.
Результат double

lshift() публичный статический Метод

Returns the left shifted value.
public static lshift ( LuaState luaState, double value, double shiftCount ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be manipulated.
shiftCount double Amount of bits to shift left by.
Результат double

rol() публичный статический Метод

Returns the left rotated value.
public static rol ( LuaState luaState, double value, double shiftCount ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be manipulated.
shiftCount double Amount of bits to rotate left by.
Результат double

ror() публичный статический Метод

Returns the right rotated value.
public static ror ( LuaState luaState, double value, double shiftCount ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be manipulated.
shiftCount double Amount of bits to rotate right by.
Результат double

rshift() публичный статический Метод

Returns the right shifted value.
public static rshift ( LuaState luaState, double value, double shiftCount ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be manipulated.
shiftCount double Amount of bits to shift right by.
Результат double

tobit() публичный статический Метод

Normalizes the specified value and clamps it in the range of a signed 32bit integer.
public static tobit ( LuaState luaState, double value ) : double
luaState LuaState Pointer to lua_State struct.
value double The value to be normalized.
Результат double

tohex() публичный статический Метод

Returns the hexadecimal representation of the number with the specified digits.
public static tohex ( LuaState luaState, double value, double digits = 8 ) : string
luaState LuaState Pointer to lua_State struct.
value double The value to be converted.
digits double The number of digits. Optional.
Результат string