From bf5ca10652a692563f2df16aada041e19b6967ed Mon Sep 17 00:00:00 2001 From: GoldenTails Date: Sun, 11 Apr 2021 18:29:14 -0500 Subject: [PATCH] acos Lua exposure --- src/lua_mathlib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lua_mathlib.c b/src/lua_mathlib.c index 9f30738b2..274725e52 100644 --- a/src/lua_mathlib.c +++ b/src/lua_mathlib.c @@ -86,6 +86,12 @@ static int lib_finetangent(lua_State *L) return 1; } +static int lib_finearccosine(lua_State *L) +{ + lua_pushangle(L, FixedAcos(luaL_checkfixed(L, 1))); + return 1; +} + // Fixed math //////////////// @@ -184,6 +190,7 @@ static luaL_Reg lib[] = { {"sin", lib_finesine}, {"cos", lib_finecosine}, {"tan", lib_finetangent}, + {"acos", lib_finearccosine}, {"FixedAngle", lib_fixedangle}, {"fixangle" , lib_fixedangle}, {"AngleFixed", lib_anglefixed},