Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.35 KB | None | 0 0
  1. (defmethod move-to ((atom cqm-atom) &rest r)
  2.   (cond ((eql (list-length r) 1) ; r is a list of one vector-3d object
  3.      (setf (location atom) (nth 0 r)))
  4.     ((eql (list-length r) 3) ; r is a list of three cortesian coordnates x, y and z
  5.      (let ((x (nth 0 r)) (y (nth 1 r)) (z (nth 2 r)))
  6.        (setf (location atom) (make-instance 'vector-3d :x x :y y :z z))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement