共 1 篇文章 |
|
# lua callc.lua.// my_math.c #include <lua.h>#include <lauxlib.h>#include <lualib.h> #include <math.h>#include <stdio.h> static int my_math_sin (lua_State *L) {lua_pushnumber(L, sin(luaL_checknumber(L, 1)));} static int my_math_cos (lua_State *L) {lua_pushnumber(L, cos(luaL_checknu... 阅520 转1 评0 公众公开 14-03-11 12:05 |