home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
GR
/
GR505.ZIP
/
LSP.EXE
/
ADDANGLE.LSP
< prev
next >
Wrap
Lisp/Scheme
|
1989-02-28
|
1KB
|
30 lines
; ADDANGLE.LSP (c)1989, Barry Bowen
; ----------------------------------------------------------
; These next routines will add the specified angle (in
; radians) to the angle (in radians) passed to the routine.
; The resulting angle will be returned in radians.
; The degrees to radians routines above are used for the
; known angle.
; ----------------------------------------------------------
;
; Sample Call: (ANGP90 LA)
; Example: If the value assigned to the variable LA was
; equal to 3.14159 (180 degrees), then the ANGP90
; routine would add 1.5708 (90 degrees) to it. The
; resulting angle in radians would be 4.71239 or
; 270 degrees.
;
; ----------------------------------------------------------
(defun ANGP45 (ANG) (+ ANG (D45))) ;ANG + 45 degrees
(defun ANGP90 (ANG) (+ ANG (D90))) ;ANG + 90 degrees
(defun ANGP180 (ANG) (+ ANG pi)) ;ANG + 180 degrees
(defun ANGP270 (ANG) (+ ANG (D270))) ;ANG + 270 degrees
; ----------------------------------------------------------