[server] Implement and match n_atan2(...)

This commit is contained in:
RD42 2024-04-27 18:33:27 +08:00
parent 7ebc00cec1
commit b612f60138

View File

@ -165,8 +165,9 @@ static cell AMX_NATIVE_CALL n_acos(AMX *amx, cell *params)
static cell AMX_NATIVE_CALL n_atan2(AMX *amx, cell *params)
{
// TODO: atan2
return 0;
CHECK_PARAMS(2);
float fResult = (float)(atan2(amx_ctof(params[1]), amx_ctof(params[2])) * (180.0f / PI));
return amx_ftoc(fResult);
}
static cell AMX_NATIVE_CALL n_atan(AMX *amx, cell *params)