[bugfix] atan and log functions doesn't accept single argument

This commit is contained in:
Yuichi Nishiwaki 2013-11-13 17:38:54 +09:00
parent 223e873ff0
commit 5479e7c6ba
1 changed files with 2 additions and 2 deletions

View File

@ -241,7 +241,7 @@ pic_number_log(pic_state *pic)
int argc; int argc;
argc = pic_get_args(pic, "f|f", &f, &g); argc = pic_get_args(pic, "f|f", &f, &g);
if (argc == 1) { if (argc == 2) {
return pic_float_value(log(f)); return pic_float_value(log(f));
} }
else { else {
@ -306,7 +306,7 @@ pic_number_atan(pic_state *pic)
int argc; int argc;
argc = pic_get_args(pic, "f|f", &f, &g); argc = pic_get_args(pic, "f|f", &f, &g);
if (argc == 1) { if (argc == 2) {
f = atan(f); f = atan(f);
return pic_float_value(f); return pic_float_value(f);
} }