[bot] Implement n_atan(...)

This commit is contained in:
RD42 2024-05-31 23:07:10 +08:00
parent 346395ee49
commit 1af18eab0c

View File

@ -66,8 +66,9 @@ static cell AMX_NATIVE_CALL n_acos(AMX *amx, cell *params)
// native Float:atan(Float:value)
static cell AMX_NATIVE_CALL n_atan(AMX *amx, cell *params)
{
// TODO: n_atan
return 0;
CHECK_PARAMS(1);
float fResult = (float)(atan(amx_ctof(params[1])) * 180 / PI);
return amx_ftoc(fResult);
}
// native Float:atan2(Float:x, Float:y)