Add lua_tofixed() and luaL_optfixed()

This commit is contained in:
LJ Sonic 2025-07-29 23:13:35 +02:00 committed by Anonimus
parent 12dc3798a7
commit 8b2626165b

View file

@ -34,7 +34,9 @@ extern "C" {
// fixed_t casting
// TODO add some distinction between fixed numbers and integer numbers
// for at least the purpose of printing and maybe math.
#define lua_tofixed(L, i) lua_tointeger(L, i)
#define luaL_checkfixed(L, i) luaL_checkinteger(L, i)
#define luaL_optfixed(L, i, d) luaL_optinteger(L, i, d)
#define lua_pushfixed(L, f) lua_pushinteger(L, f)
// angle_t casting