static int nextDouble(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); XRandom obj = (XRandom)ToLua.CheckObject <XRandom>(L, 1); double o = obj.nextDouble(); LuaDLL.lua_pushnumber(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }