Skip to content
Snippets Groups Projects
Commit 65045573 authored by LJ Sonic's avatar LJ Sonic
Browse files

Merge branch 'asin' into 'next'

arcsine Lua wrapper

See merge request !1554
parents 066a9d15 389cea2b
No related branches found
No related tags found
1 merge request!1554arcsine Lua wrapper
...@@ -88,6 +88,12 @@ static int lib_finetangent(lua_State *L) ...@@ -88,6 +88,12 @@ static int lib_finetangent(lua_State *L)
return 1; return 1;
} }
static int lib_fixedasin(lua_State *L)
{
lua_pushangle(L, -FixedAcos(luaL_checkfixed(L, 1)) + ANGLE_90);
return 1;
}
static int lib_fixedacos(lua_State *L) static int lib_fixedacos(lua_State *L)
{ {
lua_pushangle(L, FixedAcos(luaL_checkfixed(L, 1))); lua_pushangle(L, FixedAcos(luaL_checkfixed(L, 1)));
...@@ -199,6 +205,7 @@ static luaL_Reg lib_math[] = { ...@@ -199,6 +205,7 @@ static luaL_Reg lib_math[] = {
{"sin", lib_finesine}, {"sin", lib_finesine},
{"cos", lib_finecosine}, {"cos", lib_finecosine},
{"tan", lib_finetangent}, {"tan", lib_finetangent},
{"asin", lib_fixedasin},
{"acos", lib_fixedacos}, {"acos", lib_fixedacos},
{"FixedAngle", lib_fixedangle}, {"FixedAngle", lib_fixedangle},
{"fixangle" , lib_fixedangle}, {"fixangle" , lib_fixedangle},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment