diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-01-15 07:53:49 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-01-15 07:53:49 -0800 |
commit | 9ddfef0aa6718731db7823c20c5ff21be4311197 (patch) | |
tree | daab6391b211d18ec52cad30cd70c3605f38ec20 /arith.c | |
parent | 4a2d84b3dcfed6226b95c4cc32dd3d58bc848868 (diff) | |
download | txr-9ddfef0aa6718731db7823c20c5ff21be4311197.tar.gz txr-9ddfef0aa6718731db7823c20c5ff21be4311197.tar.bz2 txr-9ddfef0aa6718731db7823c20c5ff21be4311197.zip |
* arith.c (atang2): New function.
* eval.c (eval_init): Register as atang2 as a atan2 intrinsic.
* lib.h (atang2): Declared.
* txr.1: Documented atan2.
Diffstat (limited to 'arith.c')
-rw-r--r-- | arith.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1431,6 +1431,12 @@ val atang(val num) return flo(atan(c_flo(to_float(lit("atan"), num)))); } +val atang2(val y, val x) +{ + return flo(atan2(c_flo(to_float(lit("atan2"), y)), + c_flo(to_float(lit("atan2"), x)))); +} + val loga(val num) { return flo(log(c_flo(to_float(lit("log"), num)))); |