lua_Writer

lua_Writer typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud); The type of the writer function used by lua_dump. Every time it produces another piece of chunk, lua_dump calls the writer, passing along the buffer to be written (p), its size (sz), and the data parameter supplied to lua_dump. The writer returns an error code: 0 means no errors; any other value means an error and stops lua

lua_xmove

lua_xmove[-?, +?, –] void lua_xmove (lua_State *from, lua_State *to, int n); Exchange values between different threads of the same state. This function pops n values from the stack from, and pushes them onto the stack to.

lua_yield

lua_yield[-?, +?, e] int lua_yield (lua_State *L, int nresults); This function is equivalent to lua_yieldk, but it has no continuation (see §4.7). Therefore, when the thread resumes, it continues the function that called the function calling lua_yield.

lua_yieldk

lua_yieldk[-?, +?, e] int lua_yieldk (lua_State *L, int nresults, lua_KContext ctx, lua_KFunction k); Yields a coroutine (thread). When a C function calls lua_yieldk, the running coroutine suspends its execution, and the call to lua_resume that started this coroutine returns. The parameter nresults is the number of values from the stack that will be passed as results to lua_resume. When the coroutine is resumed again, Lua calls the given co

math.abs()

math.abs (x) Returns the absolute value of x. (integer/float)

math.acos()

math.acos (x) Returns the arc cosine of x (in radians).

math.asin()

math.asin (x) Returns the arc sine of x (in radians).

math.atan()

math.atan (y [, x]) Returns the arc tangent of y/x (in radians), but uses the signs of both parameters to find the quadrant of the result. (It also handles correctly the case of x being zero.) The default value for x is 1, so that the call math.atan(y) returns the arc tangent of y.

math.ceil()

math.ceil (x) Returns the smallest integral value larger than or equal to x.

math.cos()

math.cos (x) Returns the cosine of x (assumed to be in radians).