double d = luaL_checknumber(L, 1); lua_pushnumber(L, sin(d)); return 1; /* number of results */ } static const struct luaL_reg mylib [] = {
確定! 回上一頁