From 96a13e64f7a04c6c93627ae893d391c9b340e886 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 13 Mar 2018 20:57:54 -0400 Subject: [PATCH] why in the world would you use negative values for example bitshift RHS operands? --- BizHawk.Client.Common/lua/EmuLuaLibrary.Bit.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BizHawk.Client.Common/lua/EmuLuaLibrary.Bit.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.Bit.cs index 2b3655afda..4572b34eae 100644 --- a/BizHawk.Client.Common/lua/EmuLuaLibrary.Bit.cs +++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.Bit.cs @@ -44,35 +44,35 @@ namespace BizHawk.Client.Common return val ^ amt; } - [LuaMethodExample("lshift", "local uibitlsh = bit.lshift( 1000, -4 );")] + [LuaMethodExample("lshift", "local uibitlsh = bit.lshift( 1000, 4 );")] [LuaMethod("lshift", "Logical shift left of 'val' by 'amt' bits")] public static uint Lshift(uint val, int amt) { return val << amt; } - [LuaMethodExample("rol", "local uibitrol = bit.rol( 1000, -4 );")] + [LuaMethodExample("rol", "local uibitrol = bit.rol( 1000, 4 );")] [LuaMethod("rol", "Left rotate 'val' by 'amt' bits")] public static uint Rol(uint val, int amt) { return (val << amt) | (val >> (32 - amt)); } - [LuaMethodExample("ror", "local uibitror = bit.ror( 1000, -4 );")] + [LuaMethodExample("ror", "local uibitror = bit.ror( 1000, 4 );")] [LuaMethod("ror", "Right rotate 'val' by 'amt' bits")] public static uint Ror(uint val, int amt) { return (val >> amt) | (val << (32 - amt)); } - [LuaMethodExample("rshift", "local uibitrsh = bit.rshift( 1000, -4 );")] + [LuaMethodExample("rshift", "local uibitrsh = bit.rshift( 1000, 4 );")] [LuaMethod("rshift", "Logical shift right of 'val' by 'amt' bits")] public static uint Rshift(uint val, int amt) { return (uint)(val >> amt); } - [LuaMethodExample("arshift", "local inbitars = bit.arshift( -1000, -4 );")] + [LuaMethodExample("arshift", "local inbitars = bit.arshift( -1000, 4 );")] [LuaMethod("arshift", "Arithmetic shift right of 'val' by 'amt' bits")] public static int Arshift(int val, int amt) {