mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-19 03:32:41 +00:00
Fix sins/coss negative numbers on arm architecture (thanks robertkirkman) (#588)
This commit is contained in:
parent
e958ffb81c
commit
9fde4dc1b7
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ bool smlua_functions_valid_param_range(lua_State* L, int min, int max) {
|
||||||
int smlua_func_sins(lua_State* L) {
|
int smlua_func_sins(lua_State* L) {
|
||||||
if (!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
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; }
|
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
|
||||||
|
|
||||||
lua_pushnumber(L, sins(x));
|
lua_pushnumber(L, sins(x));
|
||||||
|
@ -50,7 +50,7 @@ int smlua_func_sins(lua_State* L) {
|
||||||
int smlua_func_coss(lua_State* L) {
|
int smlua_func_coss(lua_State* L) {
|
||||||
if (!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
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; }
|
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
|
||||||
|
|
||||||
lua_pushnumber(L, coss(x));
|
lua_pushnumber(L, coss(x));
|
||||||
|
|
Loading…
Reference in a new issue