private bool Lt(LuaValue a, LuaValue b, LuaState ls) { if (a.IsString()) { return(b.IsString() && string.Compare(a.GetStrValue(), b.GetStrValue(), StringComparison.Ordinal) < 0); } else if (a.IsNumber() && b.IsNumber()) { return(a.GetFloatValue() < b.GetFloatValue()); } if (LuaValue.CallMetaMethod(a, b, "__lt", ls, out var metaMethodRet)) { return(metaMethodRet.ToBoolean()); } Debug.Panic("comparison error!"); return(false); }