C# Class GarrysModLuaShared.bit

The bitwise library contains useful functions for bitwise operations.
Afficher le fichier Open project: OmegaExtern/gmod-csharp-binary-module

Méthodes publiques

Méthode Description
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.

Method Details

arshift() public static méthode

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.
Résultat double

band() public static méthode

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.
Résultat double

bnot() public static méthode

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.
Résultat double

bor() public static méthode

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.
Résultat double

bswap() public static méthode

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.
Résultat double

bxor() public static méthode

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.
Résultat double

lshift() public static méthode

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.
Résultat double

rol() public static méthode

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.
Résultat double

ror() public static méthode

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.
Résultat double

rshift() public static méthode

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.
Résultat double

tobit() public static méthode

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.
Résultat double

tohex() public static méthode

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.
Résultat string