HCoop
/
clinton
/
parenscript.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d91b35a
)
Updated atan to support two arguments as in CL.
author
Travis Cross
<tc@traviscross.com>
Mon, 31 Mar 2008 22:43:45 +0000
(22:43 +0000)
committer
Travis Cross
<tc@traviscross.com>
Mon, 31 Mar 2008 22:43:45 +0000
(22:43 +0000)
ATAN with two arguments translates into atan2 in JS.
src/lib/ps-macro-lib.lisp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/ps-macro-lib.lisp
b/src/lib/ps-macro-lib.lisp
index
6a87323
..
81c56e3
100644
(file)
--- a/
src/lib/ps-macro-lib.lisp
+++ b/
src/lib/ps-macro-lib.lisp
@@
-21,7
+21,7
@@
(tan (n) `(*math.tan ,n))
(acos (n) `(*math.acos ,n))
(asin (n) `(*math.asin ,n))
- (atan (
n) `(*math.atan ,n
))
+ (atan (
y &optional x) (if x `(*math.atan2 ,y ,x) `(*math.atan ,y)
))
(exp (n) `(*math.exp ,n))
(floor (n &optional divisor) `(*math.floor ,(if divisor `(/ ,n ,divisor) n)))
(expt (base power) `(*math.pow ,base ,power))