[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
combining sin and sind
- To: Common-Lisp at SU-AI
- Subject: combining sin and sind
- From: Earl A. Killian <Killian at MIT-MULTICS>
- Date: Wed, 07 Jul 1982 17:32:00 -0000
Instead of having both sin and sind (arguments in radians and degrees)
respectively, how aobut defining sin as
(defun sin (x &optional (y radians)) ...)
Where the second optional argument specifies the units in "cycles".
You'd use 2*pi for radians (the default), and 2*pi/360 for degrees. To
get the simplicity of sind, you'd define the variable degrees to be
2*pi/360 and write (sin x degrees).