Mercurial > hg > amuse
view default-methods.lisp @ 3:e854a73b0328
Add package definition and in-package forms.
darcs-hash:20061025162304-aa3d6-85ddf506c4c08f698cd7057917770c0ce2ce4bf3.gz
author | m.pearce <m.pearce@gold.ac.uk> |
---|---|
date | Wed, 25 Oct 2006 17:23:04 +0100 |
parents | cbb5b478307e |
children |
line wrap: on
line source
(cl:in-package #:amuse) ;; Some methods that can be defined in terms of others: ;; Time (defmethod time>= ((object1 moment) (object2 moment)) (or (time> object1 object2) (time= object1 object2))) (defmethod time<= ((object1 moment) (object2 moment)) (or (time< object1 object2) (time= object1 object2))) (defmethod time/= ((object1 moment) (object2 moment)) (not (time= object1 object2))) ;; Duration (defmethod duration>= ((object1 duration) (object2 duration)) (or (duration> object1 object2) (duration= object1 object2))) (defmethod duration<= ((object1 duration) (object2 duration)) (or (duration< object1 object2) (duration= object1 object2))) (defmethod duration/= ((object1 duration) (object2 duration)) (not (duration= object1 object2))) ;; Pitch (defmethod pitch>= ((object1 pitch) (object2 pitch)) (or (pitch> object1 object2) (pitch= object1 object2))) (defmethod pitch<= ((object1 pitch) (object2 pitch)) (or (pitch< object1 object2) (pitch= object1 object2))) (defmethod pitch/= ((object1 pitch) (object2 pitch)) (not (pitch= object1 object2))) ;; Interval (defmethod interval>= ((object1 interval) (object2 interval)) (or (interval> object1 object2) (interval= object1 object2))) (defmethod interval<= ((object1 interval) (object2 interval)) (or (interval< object1 object2) (interval= object1 object2))) (defmethod interval/= ((object1 interval) (object2 interval)) (not (interval= object1 object2)))