Lua: Add bit.arshift for arithmetic right-shift.
This commit is contained in:
parent
8e50487695
commit
6e01ca1808
|
@ -88,7 +88,16 @@ namespace BizHawk.Client.Common
|
||||||
return (uint)(val >> amt);
|
return (uint)(val >> amt);
|
||||||
}
|
}
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
|
"arshift",
|
||||||
|
"Arithmetic shift right of 'val' by 'amt' bits"
|
||||||
|
)]
|
||||||
|
public static int Arshift(int val, int amt)
|
||||||
|
{
|
||||||
|
return (int)(val >> amt);
|
||||||
|
}
|
||||||
|
|
||||||
|
[LuaMethodAttributes(
|
||||||
"check",
|
"check",
|
||||||
"Returns result of bit 'pos' being set in 'num'"
|
"Returns result of bit 'pos' being set in 'num'"
|
||||||
)]
|
)]
|
||||||
|
|
Loading…
Reference in New Issue