Fix sins/coss negative numbers on arm architecture (thanks robertkirkman) (#588)
This commit is contained in:
parent
e958ffb81c
commit
9fde4dc1b7
|
@ -40,7 +40,7 @@ bool smlua_functions_valid_param_range(lua_State* L, int min, int max) {
|
|||
int smlua_func_sins(lua_State* L) {
|
||||
if (!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
f32 x = smlua_to_number(L, 1);
|
||||
s16 x = smlua_to_number(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
|
||||
|
||||
lua_pushnumber(L, sins(x));
|
||||
|
@ -50,7 +50,7 @@ int smlua_func_sins(lua_State* L) {
|
|||
int smlua_func_coss(lua_State* L) {
|
||||
if (!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
f32 x = smlua_to_number(L, 1);
|
||||
s16 x = smlua_to_number(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
|
||||
|
||||
lua_pushnumber(L, coss(x));
|
||||
|
|
Loading…
Reference in New Issue