Mercurial > hg > amuse
comparison base/methods.lisp @ 205:5ff310be4942
Fix bug in during method, and make it the same as Allen (1983).
author | Jamie Forth <j.forth@gold.ac.uk> |
---|---|
date | Wed, 26 Jan 2011 10:44:29 +0000 |
parents | c18f795f4463 |
children | 41a5aca81030 |
comparison
equal
deleted
inserted
replaced
196:3b36cf79b525 | 205:5ff310be4942 |
---|---|
405 (time> (cut-off object2) object1) ; object1 starts before object2 ends | 405 (time> (cut-off object2) object1) ; object1 starts before object2 ends |
406 (time> (cut-off object1) (cut-off object2))))) ; object1 ends after object2 does | 406 (time> (cut-off object1) (cut-off object2))))) ; object1 ends after object2 does |
407 | 407 |
408 (defmethod during ((object1 anchored-period) | 408 (defmethod during ((object1 anchored-period) |
409 (object2 anchored-period)) | 409 (object2 anchored-period)) |
410 (and (time> object1 object2) | 410 (or (and (time> object1 object2) |
411 (time< (cut-off object2) (cut-off object2)))) | 411 (time<= (cut-off object1) (cut-off object2))) |
412 (and (time>= object1 object2) | |
413 (time< (cut-off object1) (cut-off object2))))) | |
412 | 414 |
413 (defmethod starts ((object1 anchored-period) | 415 (defmethod starts ((object1 anchored-period) |
414 (object2 anchored-period)) | 416 (object2 anchored-period)) |
415 (time= object1 object2)) | 417 (time= object1 object2)) |
416 | 418 |