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 >
Lisp/Scheme  |  1989-02-28  |  1KB  |  30 lines

  1. ; ADDANGLE.LSP   (c)1989, Barry Bowen
  2.  
  3. ; ----------------------------------------------------------
  4. ; These next routines will add the specified angle (in
  5. ; radians) to the angle (in radians) passed to the routine.
  6. ; The resulting angle will be returned in radians.
  7. ; The degrees to radians routines above are used for the
  8. ; known angle.
  9. ; ----------------------------------------------------------
  10. ;
  11. ; Sample Call: (ANGP90 LA)
  12. ; Example: If the value assigned to the variable LA was
  13. ;          equal to 3.14159 (180 degrees), then the ANGP90
  14. ;          routine would add 1.5708 (90 degrees) to it. The
  15. ;          resulting angle in radians would be 4.71239 or
  16. ;          270 degrees.
  17. ;
  18. ; ----------------------------------------------------------
  19.  
  20.   (defun ANGP45 (ANG) (+ ANG (D45))) ;ANG + 45 degrees
  21.  
  22.   (defun ANGP90 (ANG) (+ ANG (D90))) ;ANG + 90 degrees
  23.  
  24.   (defun ANGP180 (ANG) (+ ANG pi))   ;ANG + 180 degrees
  25.  
  26.   (defun ANGP270 (ANG) (+ ANG (D270))) ;ANG + 270 degrees
  27.  
  28. ; ----------------------------------------------------------
  29.  
  30.