[bugfix] atan and log functions doesn't accept single argument
This commit is contained in:
parent
223e873ff0
commit
5479e7c6ba
|
@ -241,7 +241,7 @@ pic_number_log(pic_state *pic)
|
|||
int argc;
|
||||
|
||||
argc = pic_get_args(pic, "f|f", &f, &g);
|
||||
if (argc == 1) {
|
||||
if (argc == 2) {
|
||||
return pic_float_value(log(f));
|
||||
}
|
||||
else {
|
||||
|
@ -306,7 +306,7 @@ pic_number_atan(pic_state *pic)
|
|||
int argc;
|
||||
|
||||
argc = pic_get_args(pic, "f|f", &f, &g);
|
||||
if (argc == 1) {
|
||||
if (argc == 2) {
|
||||
f = atan(f);
|
||||
return pic_float_value(f);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue